Created
April 30, 2018 17:05
-
-
Save bfolkens/4860673f1ef88221c60e5bc55196d1fd to your computer and use it in GitHub Desktop.
Install nvidia-docker2 for use in ECS
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
# | |
# Install nvidia-docker2 | |
# | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
apt-get update | |
apt-get -qq install -y nvidia-docker2 | |
cat <<"EOF" > /etc/docker/daemon.json | |
{ | |
"default-runtime": "nvidia", | |
"runtimes": { | |
"nvidia": { | |
"path": "/usr/bin/nvidia-container-runtime", | |
"runtimeArgs": [] | |
} | |
} | |
} | |
EOF | |
pkill -SIGHUP dockerd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment