Can not install nvidia-docker2 with docker 17.12.0-ce installed
lsy643 opened this issue · comments
1. Issue or feature description
When I install the nvidia-docker2 in my Ubuntu 16.04 server, the os reports:
The following packages have unmet dependencies: nvidia-docker2 : Depends: docker-ce (= 17.12.0~ce-0~ubuntu) but it is not installable or docker-ee (= 17.12.0~ee-0~ubuntu) but it is not installable E: Unable to correct problems, you have held broken packages.
I have searched related issues, and I think I have not installed the correct docker version. The nvidia-docker2 requires 17.12.0-1, but I can not find it. The most related version I can find is 17.12.0-ce.
2. Information to attach (optional if deemed irrelevant)
- [*] Kernel version from
uname -a
Linux nuc-116-9 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux - [* ] Docker version from
docker version
17.12.0-ce
What's dpkg -l | grep docker
?
I have upgrade the docker with following commands, and it worked for me.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
sudo apt-get update
sudo apt-get install docker-ce
sudo service docker restart
@lsy643
3.sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
command not work
@flx42
I'm working by
Make sure you have installed the NVIDIA driver and a supported version of Docker for your distribution (see prerequisites).
If you have a custom /etc/docker/daemon.json, the nvidia-docker2 package might override it.
Xenial x86_64
If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey |
sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu16.04/amd64/nvidia-docker.list |
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
Test nvidia-smi with the latest official CUDA image
I'm trying to test nvidia-docker 2.0 (we start containers via the Docker API and we cannot use 1.0), but I am getting this error:
$ sudo docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
docker: Error response from daemon: Unknown runtime specified nvidia.
See 'docker run --help'.
dpkg -l | grep docker
ii docker-ce 17.12.0ce-0ubuntu amd64 Docker: the open-source application container engine
ii nvidia-container-runtime 1.1.1+docker17.12.0-1 amd64 NVIDIA container runtime
ii nvidia-docker2 2.0.2+docker17.12.0-1 all nvidia-docker CLI wrapper
The content of my /etc/docker/daemon.json
{
"bip": "172.16.22.1/24",
"fixed-cidr": "172.16.22.0/24",
"mtu": 1500,
"dns": ["8.8.8.8","8.8.4.4"]
}
How to solve the issue?
Thanks
@boriskovalev , this working for me:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce=17.12.0ce-0ubuntu
sudo service docker restart
Thanks.
sudo apt-get install docker-ce=18.03.1ce-0ubuntu
Did it for me
sudo apt-get install docker-ce=18.03.1~ce-0~ubuntu