nvidia-docker2 broken dependency on older version of docker.io

I recently upgraded my TX2 to L4T 32.2, which now supports and includes nvidia-docker2. After flashing the board and installing nvidia-docker2, I continuously get error messages when using apt that say:

The following packages have unmet dependencies:
 nvidia-docker2 : Depends: docker.io (= 18.09.2-0ubuntu1~18.04.1) but 18.09.7-0ubuntu1~18.04.3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried adding the docker.io repositories to my sources list so I could attempt to install the specific version nvidia-docker2 seems to rely on, but that specific version is not available.

Does anybody know what the issue is here and how to fix it?

Hi,

You don’t need to manually install nvidia-docker on your device.
The tool is already integrated in the image from JetPack4.2.1.

Please check if all the tool is well installed with the following commands:

sudo dpkg --get-selections | grep nvidia

libnvidia-container-tools install
libnvidia-container0:arm64 install
nvidia-container-runtime install
nvidia-container-runtime-hook install
nvidia-docker2 install

sudo docker info | grep nvidia

Runtimes: nvidia runc
Name: nvidia-desktop

Here is tutorial for your reference:
https://github.com/NVIDIA/nvidia-docker/wiki/NVIDIA-Container-Runtime-on-Jetson

Thanks.

1 Like

Is the nvidia-docker tool integrated into the image by default?

In the SDK manager, I noticed on Step 2 that “NVIDIA Container Runtime” is included outside of “Jetson OS” and listed under “Jetson SDK Components”. I did not install any of the “Jetson SDK Components” during my installation/flashing of the TX2, which is why I assumed I needed to manually install the container runtime after flashing.

The reason I did not install “NVIDIA Container Runtime” with the SDK manager after flashing is because I don’t want to install all the other bloat included under “Jetson SDK Components”. My project has no need for CUDA SDK, AI, Computer Vision, or the Multimedia package, and it seems like the SDK manager won’t let you pick and choose which parts of the “Jetson SDK Components” to install; its all or none.

Is there a way to only have the SDK manager install the NVIDIA Container Runtime?

Also, here is the output of the two commands you suggested:

$ sudo dpkg --get-selections | grep nvidia
libnvidia-container-tools			install
libnvidia-container0:arm64			install
nvidia-container-runtime			install
nvidia-container-runtime-hook			install
nvidia-docker2					install

$ sudo docker info | grep nvidia
Runtimes: nvidia runc

Notice that “Name: nvidia desktop” is missing in the docker info part. Is that a problem?

If not, it appears that I manually installed nvidia-docker2 and the associated container tools properly.

Here is the constant (and annoying) dependency error message I get whenever using apt:

$ sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 nvidia-docker2 : Depends: docker.io (= 18.09.2-0ubuntu1~18.04.1) but 18.09.7-0ubuntu1~18.04.3 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Also, I just tried installing nvidia docker through the SDK manager, and the install fails because of the docker.io dependency mismatch.

Here is the relevant output from the “Terminal” tab in the SDK Manager:

13:45:04 INFO : NVIDIA Container Runtime with Docker integration (Beta) : *begin sudo dpkg -i /opt/nvidia/deb_repos/nvidia-docker2_0.9.0_beta.1+docker18.09.2-1_arm64.deb, 5
13:45:04 INFO : NVIDIA Container Runtime with Docker integration (Beta) : [target] [sudo] password for pcdangio:
13:45:04 INFO : NVIDIA Container Runtime with Docker integration (Beta) :
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Selecting previously unselected package nvidia-docker2.
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : (Reading database ... 119075 files and directories currently installed.)
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Preparing to unpack .../nvidia-docker2_0.9.0_beta.1+docker18.09.2-1_arm64.deb ...
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Unpacking nvidia-docker2 (0.9.0~beta.1+docker18.09.2-1) ...
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : dpkg: dependency problems prevent configuration of nvidia-docker2:
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : nvidia-docker2 depends on docker.io (= 18.09.2-0ubuntu1~18.04.1); however:
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Version of docker.io on system is 18.09.7-0ubuntu1~18.04.3.
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) :
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : dpkg: error processing package nvidia-docker2 (--install):
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : dependency problems - leaving unconfigured
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Errors were encountered while processing:
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : nvidia-docker2
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : Unhandled error when running sudo dpkg -i /opt/nvidia/deb_repos/nvidia-docker2_0.9.0_beta.1+docker18.09.2-1_arm64.deb
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : exit status 1
13:45:05 INFO : NVIDIA Container Runtime with Docker integration (Beta) : [ Package Install Finished with Error ]
13:45:05 ERROR : NVIDIA Container Runtime with Docker integration (Beta) : NV_DOCKER_TARGET_POST_INSTALL_COMP command scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_DOCKER_TARGET_POST_INSTALL_COMP.sh pcdangio@192.168.2.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no pcdangio@192.168.2.1 "~/tmp_NV_DOCKER_TARGET_POST_INSTALL_COMP.sh && rm -f ~/tmp_NV_DOCKER_TARGET_POST_INSTALL_COMP.sh" finished with error

It’s important to note that this is not a fresh flash of L4T… I flashed L4t 2-3 weeks ago, and probably ran an apt-upgrade which upgraded docker.io to a version that breaks nvidia-docker2. I’m going to try reflashing the whole thing and installing nvidia-docker2 right after flash. If that works, I guess I’ll have to put a hold the version of docker.io until nvidia-docker2 for arm64 comes out of beta?

After reflashing the TX2 and starting from scratch, the dependency error goes away.

I’ll mark this as the answer… but I’m assuming I basically can’t run an apt-upgrade at all out of fear of breaking dependencies.