Last active
March 18, 2019 16:48
-
-
Save tldrafael/d5058425a92536fc743d693d9dcb6cbb to your computer and use it in GitHub Desktop.
Automatically install Nvidia drivers and Nvidia runtime docker in Azure
This file contains hidden or 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
# Install nvidia-drivers | |
add-apt-repository -y ppa:graphics-drivers/ppa && \ | |
apt-get update && \ | |
apt-get install -y nvidia-415 && \ | |
# Install the latest docker-ce | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ | |
apt-key fingerprint 0EBFCD88 && \ | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \ | |
apt-get update && \ | |
apt-get install -y docker-ce && \ | |
service docker restart && \ | |
# Install nvidia docker runtime | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add - && \ | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \ | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list && \ | |
apt-get update && \ | |
apt-get install -y -o Dpkg::Options::="--force-confnew" nvidia-container-runtime nvidia-docker2 && \ | |
service docker restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment