I decided to run a longer test with the script storing states coming from the gym environment:
import resource

import argparse
import gym
import numpy as np
from itertools import count
from collections import namedtuple
import os 

import torch
import random
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
import torchvision.transforms as T
import cv2
import pickle
import glob
import time
import subprocess
from collections import namedtuple

# Functions
def ProcessState(state,torchOutput=True):
    img = cv2.cvtColor(state, cv2.COLOR_BGR2GRAY)
    img = cv2.resize(img, (imageShape[1],imageShape[0])).astype('float32')
    if torchOutput:
        img = torch.from_numpy(img)
    img /= 255
    img -= 0.5 
    img *= 2
    return img

# Variables
Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward', 'done'))

imageShape = (110,80)
env = gym.make('PongDeterministic-v3')
action = 0 
memory = []
reward = 0
done = False 
# Example with pytorch
for i_episode in range(5000):
    if i_episode % 500 is 0:
        print (str(i_episode)+' Pytorch: Memory usage: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
    
    obser = env.reset()
    obser = ProcessState(obser).clone()

    state = torch.ones((3,imageShape[0],imageShape[1])).clone()    
    state = torch.cat((state.clone(),obser.view(1,imageShape[0],imageShape[1])),0).clone()

    for t in range(10000): 
        obser, reward, done, _ = env.step(0)

        #this is new observation getting process
        obser = ProcessState(obser).clone()

        state = torch.cat((state.clone(),obser.view(1,imageShape[0],imageShape[1])),0).clone()
        
        memory.append({'state':state[:-1].clone(), 'action': action, 'state1':state[1:].clone(), 
            'reward':reward, 'done':done})
        if len(memory) > 32:
            memory = memory[1:]

        state = state[1:].clone()

        if done:
            break
# quit()
# memory = ReplayMemory(32)
# Numpy
for i_episode in range(50000):
    if i_episode % 500 is 0:
        print (str(i_episode)+' Numpy: Memory usage: %s (kb)' % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
    obser = env.reset()
    obser = ProcessState(obser,False)

    state = np.zeros((3,imageShape[0],imageShape[1]))
    state = np.concatenate([state, obser.reshape((1,imageShape[0],imageShape[1]))])

    for t in range(10000): 
        obser, reward, done, _ = env.step(0)

        #this is new observation getting process
        obser = ProcessState(obser,False)

        # state = torch.cat((state,obser.view(1,imageShape[0],imageShape[1])),0)
        state = np.concatenate([state, obser.reshape((1,imageShape[0],imageShape[1]))])
        
        memory.append({'state':state[:-1], 'action': action, 'state1':state[1:], 
            'reward':reward, 'done':done})
        if len(memory) > 32:
            memory = memory[1:]
        state = state[1:]

        if done:
            break

I am still getting issues for storing pytorch tensor. For some reason a reference is kept to some tensors and they do not get clean out of the memory. Here is the output I got (The pytorch test ran for 6 hours). I stopped the numpy after 3000 episodes as it showed stabilities.
(py3) jtremblay@office:~/code/Personal-git/dqn$ python memory_issue.py 
[2017-03-08 09:23:04,502] Making new env: PongDeterministic-v3
0 Pytorch: Memory usage: 116916 (kb)
500 Pytorch: Memory usage: 159720 (kb)
1000 Pytorch: Memory usage: 172392 (kb)
1500 Pytorch: Memory usage: 188232 (kb)
2000 Pytorch: Memory usage: 204864 (kb)
2500 Pytorch: Memory usage: 221232 (kb)
3000 Pytorch: Memory usage: 236540 (kb)
3500 Pytorch: Memory usage: 252908 (kb)
4000 Pytorch: Memory usage: 268744 (kb)
4500 Pytorch: Memory usage: 282472 (kb)
(py3) jtremblay@office:~/code/Personal-git/dqn$ python memory_issue.py 
[2017-03-08 11:30:58,943] Making new env: PongDeterministic-v3
0 Numpy: Memory usage: 116532 (kb)
500 Numpy: Memory usage: 129508 (kb)
1000 Numpy: Memory usage: 129508 (kb)
1500 Numpy: Memory usage: 129508 (kb)
2000 Numpy: Memory usage: 129508 (kb)
2500 Numpy: Memory usage: 129508 (kb)
3000 Numpy: Memory usage: 129508 (kb)

There might be something that I do not understand while manipulating the tensors, in this context I am using torch.cat, clone and from_numpy. Using the same code with numpy arrays does create any instabilities with the memory. I thought using clone everywhere I could would force to freed any reference to previous tensors. If I do not use clone this is the result usage I get after 500 episodes:
(py3) jtremblay@office:~/code/Personal-git/dqn$ python memory_issue.py 
[2017-03-08 12:51:20,207] Making new env: PongDeterministic-v3
0 Pytorch: Memory usage: 115008 (kb)
500 Pytorch: Memory usage: 492140 (kb)

Without the clone call, the memory usage is quite large. Also I never invoke the copy function in the numpy part. I am extremely confused by this behaviour.