Unable to Install Nvidia Docker

Uable to install Nvidia Docker, apt returns error.

abc@qwe:~$ sudo apt-get install -y nvidia-container-runtime
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-container-runtime : Depends: nvidia-container-toolkit (>= 1.4.1) but 1.4.0-0lambda0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
abc@qwe:~$ sudo apt-get install nvidia-docker2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-docker2 : Depends: nvidia-container-runtime (>= 3.4.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
abc@qwe:~$ sudo apt-get install nvidia-container-toolkit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-container-toolkit is already the newest version (1.4.0-0lambda0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Are you doing this in a virtual environment? You should. BTW, I think the repo has the professional edition. Do you want that or the Community edition? Does the pro version need a license key?

Python virtual environments don’t have separate Linux packages. Nvidia container runtime and Nvidia docker are not python libraries. If I am taking about wrong virtual environment, please let me know.

which repo are you referring to?

Hi,

Did you find any solution to this?
I have exactly the same error. It seems that during installing an nvidia-container-toolkit the version set up in lambda stack is forced and we cannot upgrade to newer version and hence we cannot install nvidia-docker2.

1 Like

Hello,

I am experience a similar, if not identical, issue. I tried to install nvidia-docker2 and received the following output:

❯ sudo apt install nvidia-docker2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-docker2 : Depends: nvidia-container-toolkit (>= 1.7.0-1) but 1.5.1+dfsg-0lambda0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I am running Ubuntu 20.04 and the Lambda Stack was pre-installed and up-to-date. Any information for installing nvidia-docker2 package would be greatly appreciated.

1 Like

Same issue, have you found a solution?

nvidia-docker2 is old version And from above messages they have other versions installed that conflict.

A example tutorial is here:

Basically install:
Ubuntu 20.04 LTS, The Lambda Stack…
Then:
sudo apt-get install -y docker.io nvidia-container-toolkit
sudo systemctl daemon-reload
sudo systemctl restart docker

And pull the images you want and run docker.

I hope that helps. It will depend on other package conflicts you may have installed on your machine.
And there are a few other ways to do this depending on the versions of docker installed.

Mark