Skip to content

Instantly share code, notes, and snippets.

@moriarty
Created March 13, 2019 02:38
Show Gist options
  • Save moriarty/8e0bfc320723c96c53a03c1933c5cdbb to your computer and use it in GitHub Desktop.
Save moriarty/8e0bfc320723c96c53a03c1933c5cdbb to your computer and use it in GitHub Desktop.
install docker and nvidia docker2
1 sudo apt-get update
2 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
3 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4 sudo apt-key fingerprint 0EBFCD88
5 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
6 $(lsb_release -cs) \
7 stable"
8 sudo apt-get update
9 sudo apt-get install docker-ce docker-ce-cli containerd.io
10 sudo groupadd docker
11 sudo usermod -aG docker $USER
12 docker run hello-world
13 groups
14 sudo usermod -aG docker $USER
15 groups
16 sudo reboot
17 groups
18 docker run hello-world
19 apt search nvidia-docker
20 curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add
21 distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
22 curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
23 sudo apt-get update
24 apt search nvidia-docker
25 sudo apt install nvidia-docker2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment