Public Repository

Last pushed: 4 months ago
Short Description
Ubuntu (Trusty) : Anaconda : CUDA : CuDNN : TensorFlow-gpu
Full Description

Dockerfile

FROM ubuntu:trusty
RUN mkdir /home/Downloads
COPY . /home/Downloads
WORKDIR /home

Go to where the Anaconda, CUDA, and CuDNN installation files are located.

cd /home/Downloads

Install Anaconda.

bash Anaconda3-4.4.0-Linux-x86_64.sh
export PATH="/root/anaconda3/bin:$PATH"
rm Anaconda3-4.4.0-Linux-x86_64.sh

Install CUDA.

sudo apt update
sudo apt upgrade
sudo apt install wget
sudo dpkg -i cuda-repo-ubuntu1404_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export CUDA_HOME=/usr/local/cuda
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
rm cuda-repo-ubuntu1404_8.0.61-1_amd64.deb

Install CuDNN.

tar -zxf cudnn-8.0-linux-x64-v5.1.tgz
cd cuda
cp lib64/ /usr/local/cuda/lib64/
cp include/
/usr/local/cuda/include/
rm -rf cuda installers
rm cudnn-8.0-linux-x64-v5.1.tgz

Install TensorFlow-gpu.

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.1.0-cp36-cp36m-linux_x86_64.whl

Test TensorFlow-gpu.

python

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

Docker Pull Command
Owner
housebunting

Comments (0)