atinfinity / sdk_manager_docker

Dockerfile to use NVIDIA SDK Manager on Docker container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker host requirements

villerantanen opened this issue · comments

Hi! Thanks for this tool, I was using it to flash AGX Jetson or a Ubuntu 20.04 system.

You could add in the requirements, that the host system, in addition to docker, must also have package qemu-user-static, since even if run as privileged, docker couldn't install the kernel module for qemu.

(
Jetson OS Image step will result in error, where dpkg command does not match the architecture, and in the docker container
dpkg-reconfigure qemu-user-static complains that it can not load the kernel module.
All of these were fixed by installing the qemu package in the host system too.
)

Hey @villerantanen, thanks for pointing this out! This tip helped with my installation on an AGX :)

I wanted to note though, that adding qemu-user-static to the list of programs installed via apt in the Dockerfile did not work for me. Weirdly enough, after failing on the chroot, which is caused by the missing package, I double checked that it was installed, but it wasnt! During the installation, sdkmanager however reports:

13:11:45 INFO: File System and OS: exec_command: sudo apt-get install -y qemu-user-static
13:11:46 INFO: File System and OS: qemu-user-static is already the newest version (1:2.11+dfsg-1ubuntu7.29).

I dont know what is going on here, since I built the image after modifying the Dockerfile. Maybe someone can reproduce this?

Either way, just installing qemu-user-static in the container after failing on 'Installing DSB Packages' in the sdk-manager log did the trick.

EDIT:
Turns out I was actually missing the binfmt-support package. While playing around I must have accidentally installed a program which conflicts with qemu-user-static and as such had trouble finding it. I have implemented the changes you requested on my fork, since it doesnt look like this repo is being maintained anymore.

@villerantanen @Sinitax0 Thank you for your comment. This page might be helpful to you.
https://docs.nvidia.com/sdk-manager/docker-containers/index.html#docker-containers

@atinfinity That is indeed a great reference. In my experience, however, the installation of newer Jetpack versions does require additional packages.

Can be solved by running this command in container or host which has qemu-user-static installed:

mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
update-binfmts --enable qemu-aarch64
update-binfmts --enable qemu-arm
update-binfmts --enable qemu-armeb