NVIDIA SDK Manager on Docker container

I made a Dockerfile to use NVIDIA SDK Manager on Docker container. Please give me feedback about this.
https://github.com/atinfinity/sdk_manager_docker

And, I confirmed on in the following environment.

  • Platform of Host PC: Ubuntu 18.04
  • SDK Manager Version: 0.9.12
  • Target Device: Jetson TX2
1 Like

Cool! Thanks for sharing!

Thank you! It worked without needing any changes on 29-JUN-2019

Thank you! This worked just fine, I just changed the version to the latest for Jetpack 4.2.1. This is really a big help, I was tired of the Jetson install screwing up my host OpenCV installation and VM’s weren’t working with USB. Great work!

Just what I was looking for. I wish there was a flatpak app or something for it. I wasted a lot of time trying to get the SDK Manager to work, but none of my 3 laptops had the OS it requires. Even though it might work, it doesn’t even try :(

THANKS!

Thanks! By the way in order to enter the password automatically when using sdkmanager with the command-line in a script you can use “expect” on linux.

Thanks for this. It works well on my 19.10 setup, targeting a Jetson Nano Developer Kit (A02).

Great. I hope it works in my environment.

In my current situation, I tried using Xavier.
An error occurred and writing was not possible.

It was written in the SDKManager log.

File System and OS: chroot: failed to run command ‘mount’: Exec format error

・ Ubuntu 16.04
・ SDK Manager 1.0.1.5538
・ Jetson AGX XAVIER 32G

I used sdkmanager_1.0.0-5517_amd64.deb to setup Jetson AGX Xavier.

File System and OS: chroot: failed to run command ‘mount’: Exec format error

Could you share full log file?

04:34:39 ERROR : File System and OS : chroot: failed to run command ‘mount’: Exec format error
04:34:39 ERROR : File System and OS : Run commands failed at step Install: command /tmp/tmp_NV_L4T_FILE_SYSTEM_AND_OS_T194_COMP.sh finished with error
04:34:39 ERROR : File System and OS : command terminated with error
04:34:39 ERROR : File System and OS : install ‘File System and OS’ failure, command < cd ‘/home/jetpack/nvidia/nvidia_sdk/JetPack_4.3_Linux_P2888’ ; ‘/opt/nvidia/sdkmanager/resources/app/output/installUtils/adapter’ -a=‘install’ -c=‘eyJpZCI6Ik5WX0w0VF9GSUxFX1NZU1RFTV9BTkRfT1NfVDE5NF9DT01QIiwibmFtZSI6IkZpbGUgU3lzdGVtIGFuZ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iwiaW5zdGFsbFN0YXR1cyI6Im5vbmUiLCJhY3Rpb24iOjEsImRvd25sb2FkRXJyb3JzIjpbXSwiZmlyc3REb3dubG9hZEZpbGUiOiIvaG9tZS9qZXRwYWNrL0Rvd25sb2Fkcy9udmlkaWEvc2RrbV9kb3dubG9hZHMvVGVncmFfTGludXhfU2FtcGxlLVJvb3QtRmlsZXN5c3RlbV9SMzIuMy4xX2FhcmNoNjQudGJ6MiIsImJ1bmRsZVRpdGxlIjoiSmV0UGFja180LjNfTGludXgiLCJpbnN0YWxsUGF0aCI6Ii9ob21lL2pldHBhY2svbnZpZGlhL252aWRpYV9zZGsvSmV0UGFja180LjNfTGludXhfUDI4ODgiLCJpbnN0YWxsUm9vdCI6Ii9ob21lL2pldHBhY2svbnZpZGlhL252aWRpYV9zZGsiLCJib2FyZElEIjoiUDI4ODgiLCJ0YXJnZXRBY2Nlc3NJbmZvIjp7InVzZXIiOiIiLCJwYXNzd29yZCI6IiIsImhvc3QiOiIxOTIuMTY4LjU1LjEiLCJwb3J0IjoiMjIifSwiaXNEcnlSdW4iOmZhbHNlfQ==’ -i=‘NV_L4T_FILE_SYSTEM_AND_OS_T194_COMP’ -v=‘32.3’ -l=’/home/jetpack/nvidia/nvidia_sdk/JetPack_4.3_Linux_P2888’ -L=’/home/jetpack/.nvsdkm/logs/JetPack_4.3_Linux’ -p=‘15543’ -t=‘P2888’ -e=’/home/jetpack/Downloads/nvidia/sdkm_downloads/Tegra_Linux_Sample-Root-Filesystem_R32.3.1_aarch64.tbz2’ > terminated with error
04:34:41 ERROR : Device Mode Host Setup in Flash : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : Flash Jetson AGX Xavier : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : Device Mode Host Setup in Target SDK : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : DateTime Target Setup : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : CUDA Toolkit for L4T : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : cuDNN on Target : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : TensorRT on Target : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : OpenCV on Target : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : VisionWorks on Target : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : VPI : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : NVIDIA Container Runtime with Docker integration (Beta) : Flash skipped due to component(s) download/install failure
04:34:41 ERROR : Multimedia API : Flash skipped due to component(s) download/install failure
INSTALLATION FAILED
Please review the terminal tab for details. Resolve and RETRY.
EXPORT LOGS

RETRY
FAILED ITEMS

STOP TRYING

Copyright © 2020,

NVIDIA CORPORATION
.
All rights reserved.
|
NVIDIA Developer

Write the text of the log that you hurriedly copy.

Is the log file stored somewhere?

I found similar topic.

I read the following instruction.
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fquick_start.html%23wwpID0E0ND0HA

And, I found the following step.

sudo apt-get install qemu-user-static

So, could you try to add qemu-user-static in Dockerfile?

1 Like

Thank you very much.
I will try that procedure now.

I checked the installed Docker container.

dpkg -l

qemu-user-static was installed.
Should I write it in the Dockerfile and start over?

Maybe, this is a problem of NVIDIA SDK Manager.
So, I think that you need to discuss on the following topic.

If you have previous version(sdkmanager_1.0.0-5517_amd64.deb), please try to use this version.

Thank you very much.

I will investigate and write here if I know something.

Hello.
I will report that the problem has been resolved.
The cause of the problem is that Xavier was not connected to the network.
When I connected Xavier to the network, the writing was successful.
(I used JetPack 4.2.3)

The reason why you can not write without connecting to the network even though you are writing using SDKManager is a mystery.

When installing CUDA, a message was displayed on the screen indicating that an error occurred, but CUDA was being transferred to Xavier.
The sample program worked.

For those facing ERROR : File System and OS : chroot: failed to run command 'mount': Exec format error.
You must somehow register qemu to run ARM binaries under x86 machine.
What I did:
Run everything until error occured (qemu and dependencies are not installed in docker at the beginning).
Then:

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

when i ran ./launch_container.sh
i got following error

./launch_container.sh: line 6: xauth: command not found
./launch_container.sh: line 6: xauth: command not found
./launch_container.sh: line 10: realpath: command not found
docker: Error response from daemon: Mounts denied:
The paths /Downloads and /nvidia
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences… -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERRO[0000] error waiting for container: context canceled

SO I CHANGED THE SHELL AS FOLLOWS

#!/bin/sh

XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e ‘s/^…/ffff/’ | xauth -f $XAUTH nmerge -

mkdir -p jetpack_home/nvidia
mkdir -p jetpack_home/Downloads
JETPACK_HOME=$(realpath ./jetpack_home)

docker run --privileged --rm -it
–volume=/XSOCK:$XSOCK:rw
–volume=/XAUTH:XAUTH:rw \ --volume=/dev:/dev:rw \ --volume=Users/Documents/Dockerfiles/sdk_manager_docker-master/jetpack_home/ nvidia:/home/jetpack/nvidia:rw \ --volume=Users/Documents/Dockerfiles/sdk_manager_docker-master/jetpack_home/ Downloads:/home/jetpack/Downloads:rw \ --shm-size=1gb \ --env="XAUTHORITY={XAUTH}"
–env=“DISPLAY=${DISPLAY}”
–env=TERM=xterm-256color
–env=QT_X11_NO_MITSHM=1
–net=host
-u “jetpack”
jetpack:latest
bash

NOW I GET FOLLOWING ERROR

./launch_container.sh: line 6: xauth: command not found
./launch_container.sh: line 6: xauth: command not found
./launch_container.sh: line 10: realpath: command not found
docker: invalid reference format.
See ‘docker run --help’.