anancds / document

MIT License
1 stars 0 forks source link

install nvidia-docker #162

Open anancds opened 3 years ago

anancds commented 3 years ago
  1. docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
  2. sudo apt-get purge -y nvidia-docker
anancds commented 3 years ago

这里可以先下载下来,然后执行:sudo apt-key add gpgkey

  1. curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ sudo apt-key add -
  2. distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
  3. curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ sudo tee /etc/apt/sources.list.d/nvidia-docker.list
  4. sudo apt-get update
anancds commented 3 years ago
  1. sudo apt-get install -y nvidia-docker2
  2. sudo pkill -SIGHUP dockerd
anancds commented 3 years ago
  1. docker run --runtime=nvidia --rm nvidia/cuda:10.1-base nvidia-smi