Can't install nvidia-docker2

Any suggestions?

$ 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:

$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
$ sudo vi /etc/apt/preferences.d/nvidia-docker-pin-1002

  • add the lines
    $ sudo apt-get update
    $ sudo apt-get install nvidia-docker2

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]

Get:1 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 libnvidia-container-tools 1.8.1-1 [23.4 kB]
Get:2 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 libnvidia-container1 1.8.1-1 [926 kB]
Get:3 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 nvidia-container-toolkit 1.8.1-1 [978 kB]
Get:4 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 nvidia-docker2 2.9.1-1 [5,536 B]

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.