nvidia-docker : Unknown runtime specified nvidia
It seems you may need to purge docker and reinstall it as in the post:github issues
sudo apt remove docker-cesudo apt autoremovesudo apt-get install docker-ce=5:18.09.0~3-0~ubuntu-bionicsudo apt install nvidia-docker2
This is how I resolve the above problem for CentOS 7; hopefully it can help anyone who has similar problems.
- Add necessary repos to get nvidia-container-runtime:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.repo | sudo tee /etc/yum.repos.d/nvidia-container-runtime.repo
- (Optional) In my case, I disabled the experimental repos:
sudo yum-config-manager --disable libnvidia-container-experimentalsudo yum-config-manager --disable nvidia-container-runtime-experimental
- Install nvidia-container-runtime package:
sudo yum install nvidia-container-runtime
- Update docker daemon:
sudo vim /etc/docker/daemon.json
with the path to nvidia-container-runtime:
{ "runtimes": { "nvidia": { "path": "/usr/bin/nvidia-container-runtime", "runtimeArgs": [] } }}
- Finally, you need to make docker update the path:
sudo pkill -SIGHUP dockerd
Actually, you can try to restart docker daemon by following command.
sudo systemctl daemon-reloadsudo systemctl restart docker
Or you can try to reboot your system.to make nvidia-docker work