I tried to install the nvidia-docker after installing docker-ce. I followed this : https://github.com/NVIDIA/nvidia-docker to install nvidia-docker. It seems to have install
Follow the instruction in FAQ and my problem was solved.
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-ce
sudo apt autoremove
sudo apt-get install docker-ce=5:18.09.0~3-0~ubuntu-bionic
sudo apt install nvidia-docker2
This is how I resolve the above problem for CentOS 7; hopefully it can help anyone who has similar problems.
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
sudo yum-config-manager --disable libnvidia-container-experimental
sudo yum-config-manager --disable nvidia-container-runtime-experimental
sudo yum install nvidia-container-runtime
sudo vim /etc/docker/daemon.json
with the path to nvidia-container-runtime:
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
sudo pkill -SIGHUP dockerd
Actually, you can try to restart docker daemon by following command.
sudo systemctl daemon-reload
sudo systemctl restart docker
Or you can try to reboot your system. to make nvidia-docker work