Skip to content

Instantly share code, notes, and snippets.

@stefancrain
Created March 18, 2020 14:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefancrain/0b4fe2ae29a15427a5d7040a9f7cdb5c to your computer and use it in GitHub Desktop.
Save stefancrain/0b4fe2ae29a15427a5d7040a9f7cdb5c to your computer and use it in GitHub Desktop.
Setup NVIDIA drivers and nvidia-container-runtime for docker on debian / ubuntu 18.04
#!/bin/bash
# https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo chmod 644 /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install -y nvidia-container-runtime
sudo apt-get install -y nvidia-headless-435
sudo apt-get install -y nvidia-utils-435
sudo apt-get install -y nvidia-settings
sudo apt-get install -y ocl-icd-opencl-dev
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment