$ sudo apt-get install -y 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.8.1-1) but 1.7.0+dfsg-0lambda0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
nvidia-docker2 is the old way to install. It is no longer part of Ubuntu or Lambda stack.
Here is a tutorial on the current way:
If you really need nvidia-docker2, I have just tested it on my machine (which I grant is on newer test version of Lambda-stack for desktops/GeForce). Worked and did not conflict.
From:
The following seemed to work and no longer conflict:
That shows me:
The following additional packages will be installed:
libnvidia-container-tools libnvidia-container1 nvidia-container-toolkit
The following NEW packages will be installed:
nvidia-docker2
The following packages will be upgraded:
libnvidia-container-tools libnvidia-container1 nvidia-container-toolkit
3 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 1,932 kB of archives.
After this operation, 5,163 kB of additional disk space will be used.
Do you want to continue? [Y/n]
But with Lambda Stack generally you should not need the nvidia-docker2. And just use the:
$ sudo apt-get install -y docker.io nvidia-container-toolkit
(or docker-compose, etc if you use that)
But now I have:
/usr/bin/docker - from docker.io
/usr/bin/nvidia-docker - from nvidia-docker2
I know previous versions did conflict of nvidia-docker2 - so this is a improvement for me.