Kaixhin/dockerfiles

Theano couldn't use cudnn

Closed this issue · 5 comments

jrao1 commented

Using docker 1.10.3 on Ubuntu 14.04 to run docker run -it --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia0 kaixhin/cuda-keras:7.0, then inside the vm start python and try to import theano, it says "CuDNN not available". Try to force cudnn by adding "optimizer_including=cudnn", it shows theano couldn't find cudnn.h.

It looks to me that in addition to install libcudnn4 in dockerfile, you also need to install libcudnn4-dev to provide the header file.

I'm on holiday at the moment so I can't easily test this, but can you confirm that this line would have to be changed to apt-get update && apt-get install -y libcudnn4 libcudnn4-dev? If so then I will adjust all versions of kaixhin/cudnn and get new builds made.

jrao1 commented

Yes, I think so, here's my local dockerfile to run keras under 7.0, also tested 7.5:

FROM kaixhin/cuda-keras:7.0

# Install dependencies
RUN apt-get update && apt-get install -y \
  libcudnn4 \
  libcudnn4-dev \
  nano

# Force CuDNN
RUN echo "[global]\ndevice=gpu\nfloatX=float32\noptimizer_including=cudnn\n[lib]\ncnmem=1\n[nvcc]\nfastmath=True" > /root/.theanorc

An updated version of kaixhin/cuda-theano:7.0 has now been built. Please check and if it works then I can close this issue.

jrao1 commented

Yes, this works now.

Perfect, thanks! For future reference if it's a relatively small fix and you've tested it then go ahead and submit a pull request if you can.