Can't install nvidia-container-runtime

I need to install nvidia-container-runtime, but it appears that a package it depends on is out-of-date.
Any chance you guys could update nvidia-container-toolkit?

# apt install 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.9.0-1) but 1.7.0+dfsg-0lambda0.20.04.1 is to be installed

This is normally seen when using a other repositories. Most common with the deprecated nvidia-docker2 package. We are working on adding a 1.9.0-1 or higher version to the lambda-stack.

You can remove nvidia-docker2 and use docker with:

There are changes also. If you are not ready to move to docker.io, I have seen issues also with old setups for yaml files for docker-compose and you can just edit the yaml file.

But to setup nvidia-docker2 (wrapper script):

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 following lines:
    Package: *
    Pin: origin nvidia.github.io
    Pin-Priority: 1002

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

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 add docker-compose, etc if you use that)

Now I have:
/usr/bin/docker - from docker.io
/usr/bin/nvidia-docker - from nvidia-docker2 (the old wrapper script).