Last active
January 2, 2020 01:48
-
-
Save BohdanTkachenko/ce712410ddff53dad0fdcde1e35c9916 to your computer and use it in GitHub Desktop.
Install NVIDIA drivers and nvidia-docker on Ubuntu (if Docker is installed already)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add-apt-repository -y ppa:graphics-drivers/ppa | |
apt-get update -y | |
apt-get install -y build-essential | |
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/381.09/NVIDIA-Linux-x86_64-381.09.run | |
sh NVIDIA-Linux-x86_64-381.09.run -q -a --ui=none | |
rm NVIDIA-Linux-x86_64-381.09.run | |
apt-get install -y nvidia-384 nvidia-modprobe | |
nvidia-smi | |
wget https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb | |
dpkg -i nvidia-docker_1.0.1-1_amd64.deb | |
rm nvidia-docker_1.0.1-1_amd64.deb | |
nvidia-docker run --rm nvidia/cuda nvidia-smi | |
curl -s localhost:3476/docker/cli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script is supposed to be run on Rancher hosts to support GPU for Docker containers. After creating a host, just run this script (you can use shortcut
wget -O - https://git.io/vdM98 | sudo bash
). Also, make sure that for GPU containers you specified a volumenvidia_driver_384.90:/usr/local/nvidia:ro
. See this issue rancher/rancher#4883 for more information.