Skip to content

Instantly share code, notes, and snippets.

@bfolkens
Created April 30, 2018 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfolkens/4860673f1ef88221c60e5bc55196d1fd to your computer and use it in GitHub Desktop.
Save bfolkens/4860673f1ef88221c60e5bc55196d1fd to your computer and use it in GitHub Desktop.
Install nvidia-docker2 for use in ECS
#
# 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