sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo reboot
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update -y
sudo apt-get install -y nvidia-367 nvidia-modprobe
sudo apt-get reboot
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update -y
sudo apt-get install docker-engine
sudo service docker start
sudo usermod -aG docker ubuntu
curl -L -O https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-rc.3/nvidia-docker_1.0.0.rc.3-1_amd64.deb
sudo dpkg -i nvidia-docker_1.0.0.rc.3-1_amd64.deb
rm -f nvidia-docker_1.0.0.rc.3-1_amd64.deb
# Test with nvidia-smi
sudo nvidia-docker run --rm nvidia/cuda nvidia-smi