2016年7月13日 星期三

Tensorflow's docker image with gpu supported doesn't work

Nvidia driver要先裝好
https://github.com/NVIDIA/nvidia-docker/wiki/Installation

先裝docker-engine
https://docs.docker.com/engine/installation/
 再裝nvidia-docker
https://github.com/NVIDIA/nvidia-docker
使用Tensorflow Docker image(注1)
$ nvidia-docker pull gcr.io/tensorflow/tensorflow:latest-gpu
$ nvidia-docker run -it gcr.io/tensorflow/tensorflow:latest-gpu sh -c 'python -m tensorflow.models.image.mnist.convolutional'
結果 not find libcudnn.so

離開 container (Ctrl+D)

進入 container,使用bash
 $ nvidia-docker run -it gcr.io/tensorflow/tensorflow:latest-gpu bash
 連結
$ ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.4 /usr/lib/x86_64-linux-gnu/libcudnn.so
Run again
$ python -m tensorflow.models.image.mnist.convolutional
結果
https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#docker-installation 
注1: If cannot connect to the Docker daemon. Is the docker daemon running on this host?
http://stackoverflow.com/questions/33562109/docker-command-cant-connect-to-docker-daemon

沒有留言:

張貼留言