GPU主机重启后,启动使用GPU的容器报错
docker: Error response from daemon: Unknown runtime specified nvidia.
解决办法:修改/etc/docker/daemon.json并重启docker
vim /etc/docker/daemon.json
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
systemctl daemon-reload
systemctl restart docker
使用普通用户跑docker
解决方法:把用户加入docker组
usermod -aG docker user