docker报错docker: Error response from daemon: Unknown runtime specified nvidia.
解决方法来自博客:https://blog.csdn.net/weixin_32820767/article/details/80538510
原来是nvidia-docker 没有注册:docker: Error response from daemon: Unknown runtime specified nvidiawhile running nvidia docke 接着寻找如何注册: docker-engine-setup
Systemd drop-in file
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --host=fd:// --add-runtime=nvidia=/usr/bin/nvidia-container-runtime
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Daemon configuration file
sudo tee /etc/docker/daemon.json <<EOF
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
EOF
sudo pkill -SIGHUP dockerd
再去开启镜像,done。