报错信息:
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
解决方法:
1,任意路径下创建nvidia-container-runtime-script.sh文件
vim nvidia-container-runtime-script.sh
拷贝下方内容到nvidia-container-runtime-script.sh中:
sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
sudo apt-key add -distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
sudo 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 apt-get update
2,执行
sudo apt-get install nvidia-container-runtime
3,验证
which nvidia-container-runtime
4,重启docker
sudo systemctl restart docker 或 service docker restart
标签:daemon,container,sudo,apt,报错,nvidia,docker,runtime
From: https://www.cnblogs.com/tommickey/p/17835995.html