Public Repository

Last pushed: 2 months ago
Short Description
GPU-enabled TensorFlow on Ubuntu 16.04
Full Description

Summary of specs

  • Ubuntu 16.04.4 LTS (codename xenial)
  • TensorFlow 1.5 (GPU-enabled)
  • Anaconda 3-5.1.0 with Python 3.6.4
  • emacs-nox
  • wget
  • hyperopt

Install docker-ce and nvidia-docker

Visit for docker-ce and for nvidia-docker.

Installation of nvidia-docker on Xenial x86_64

If nvidia-docker 1.0 is installed, remove it and all existing GPU containers

docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker

Add the package repositories

curl -s -L | \
  sudo apt-key add -
curl -s -L | \
  sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update

Install nvidia-docker2 and reload the Docker daemon configuration

sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd

Test nvidia-smi with the latest official CUDA image

docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi

Launch the latest TensorFlow-gpu container in batch mode

nvidia-docker run -it bash

Install packages

Once having entered the container in batch mode, run the following commands:

cd /home
apt-get update
apt-get install emacs-nox
apt-get install man
apt-get install wget
export PATH="/root/anaconda3/bin:$PATH"
python -m pip install -U py-cpuinfo
pip install hyperopt
apt install libgl1-mesa-glx
pip install --ignore-installed --upgrade
pip install networkx==1.11

Commit the container to the image

docker commit <container ID> tfgpu
Docker Pull Command