Failure to run SDK Manager from official docker image

I’m new to all this so please bear with me.

I’m trying to flash a Jetson TX2 device with 4.4.1.

The last few days I’ve tried probably all combinations, booting from usb drive on plain Ubuntu 18 LTS, etc. After many failed trials I found this:

https://docs.nvidia.com/sdk-manager/docker-containers/index.html

which to my undestanding is the ULTIMATE way to get a controlled environment in which sdkmanager can be run, without the risk of any interference from the host, missing dependencies, misconfiguration, errors in the procedure, etc.

Well, it FAILS.

At the begining I was constantly blaming myself, it has to be this, or that, endlessly, but when I found this I thought I won the lottery, a self contained environment where NVIDIA engineers have the last word in everything, no more host or environment miseries, well, again, not the case.

As far as I know, there’s no chance of failure under docker if everything is properly defined, I wonder then how this could be happening. The whole idea is to execute those few steps and be ready to go.

As seen in the pic the error is when it tries to exec

'dpkg': Exec format error

that smells to me as an attempt to run a binary that is meant to ARM in X86 or viceversa, but again, isn’t that the magic inside the docker image should fix all that? For instance qemu or whatever should be used to flash a device?

Environment and procedure:

Environment to BUILD the container ONLY: Ubuntu 18 LTS VirtualBox VM

Note: I know that VMs don’t get well with flashing BUT at this stage I’m only trying to build the container (basically download everything and then commit the container and NOT actually flashing even though):

Procedure:

$ docker load -i sdkmanager-1.4.0.7363_docker.tar.gz

$ docker tag sdkmanager:1.4.0.7363 sdkmanager:latest

$ docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb/ --name JetPack_TX2_Devkit sdkmanager --cli install --logintype devzone --product Jetson --target P3310-1000 --targetos Linux --version 4.4.1 --select 'Jetson OS' --deselect 'Jetson SDK Components' --license accept --staylogin true --datacollection enable

Results:

One thing that is maybe relevant is that the log says that QEMU bin was not present (isn’t it supposed to be provided in the dockerfile as one of many dependencies?). It finally tries and installs it from the host (Ubuntu 18 LTS), see details:

info: Start L4T BSP package installation
info: QEMU binary is not available, looking for QEMU from host system
info: Found /usr/bin/qemu-aarch64-static
info: Installing QEMU binary in rootfs

So, I’m puzzled here. I’m not sure what to do to be honest, this official docker image was my silver bullet after so many failures.

What am I doing wrong?

Thanks in advance!!

1 Like

Hi,

Thanks for reporting this to us.
We are checking this internally. Will update more information with you later.

Thanks.

1 Like

I just wanted to mention that this is a problem with the Jetson Nano target as well.

1 Like

im having the same problem. its complaining that the jetson nano image exists already so it fails to flash. and im not able to skip that part

docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb/ --name JetPack_Nano1_Devkit sdkmanager --cli install --logintype devzone --product Jetson --version 4.5 --targetos Linux --host --target P3448-0000 --flash all --additionalsdk DeepStream --license accept --staylogin true

Hi,

Thanks for all of your information.
We are checking this issue internally. Will get back to you later.

1 Like

Hi,

We have double checked the tool.
And be able to flash the device without any issue.

Here are our steps:

  1. Download and install Docker engine

  2. Enable managing Docker as a non-root user

  3. Load Docker image:

    $ docker load -i ./sdkmanager-1.4.0.7363_docker.tar.gz
    $ docker tag sdkmanager:1.4.0.7363 sdkmanager:latest

  4. Flashing with below CLI:

    $ docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb/ --name JetPack_TX2_Devkit sdkmanager --cli install --logintype devzone --product Jetson --target P3310-1000 --targetos Linux --version 4.4.1 --select ‘Jetson OS’ --deselect ‘Jetson SDK Components’ --flash all --license accept --staylogin true --datacollection enable --exitonfinish

Please noted that you will need to update the --target based on the board you used.
Here are the corresponding value for your reference:

Device Target
Xavier-16GB P2888-0001
Xavier-32GB P2888-0004
Xavier-8GB P2888-0006
NX SDcard P3668-0000
NX EMMC P3668-0001
TX2 P3310-1000
Nano SDcard P3448-0000
Nano EMMC P3448-0002
Nano-2GB P3448-0003

Thanks.

Hi!

I can confirm that this works. I was using interactive selections previously, and this does not work.

ohh ok… by the way we are on Jetpack 4.5 at this point. i see the command line you used has Jetpack 4.4.1 is that just an example of you telling me " run your command line non interactively?" or are you actually also saying i should use jetpack 4.4.1 ?

the next commenter said sdkmanager docker doesnt work interactively yet but worked non interactively for him. what specifically on this command line are the parameters that make this “non interactive”? thanks

Hi,

We follow the document so test the JetPack 4.4.1 case.
Will test the latest version as well as interactive mode later.

Thanks.

Hi, juan.suero

Thanks for your reporting.

We can also reproduce the error with JetPack4.5.
Our internal team is checking on this and will share more information with you later.

Thanks and sorry for any inconvenience.

Hi everyone,

I think I have the same problem, with JetPack 4.5 on the Xavier NX Dev Kit (SDKmanager 1.4.1.7402 on Docker). See the sdkm log file attached with my post here: https://forums.developer.nvidia.com/t/failed-to-flash-with-sdk-manager-docker-version/170549/3?u=david102

Thanks,

David

I am using the docker image 1.4.1.7402 to flash my system.

I am using the above command as specified by @AastaLLL
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb/ --name JetPack_TX2_Devkit sdkmanager --cli install --logintype devzone --product Jetson --target P3310-1000 --targetos Linux --version 4.4.1 --select ‘Jetson OS’ --deselect ‘Jetson SDK Components’ --flash all --license accept --staylogin true --datacollection enable --exitonfinish

My build fails with ‘dpkg’: Exec format error as well.

Think this Got me too.

Hi,

The format error is usually caused by the incorrect environment.
Do you run the docker on a Ubuntu host?

Thanks.

Yes I am running this on Ubuntu 20.04

Please check the comment shared by EdwardZhou below

Hello,
You mean I can’t run docker sdkm on ubuntu 20? If I install ubutun 16 or 18, why should I use docker? I will use sdkm with graphics.

Hi fhsocca_nvidia,

Can you please try the following steps?

  1. Install “qemu-user-static” package on your host machine.
  2. Reinstall the JetPack container from scratch.

Hi, all

We have narrowed down the root cause.
The sdkmanger docker is built with Ubuntu server edition, which doesn’t have binutils package installed by default.

To solve this, please attach to the container and manually install the package.

$ sudo docker exec [Container ID] sudo apt install binutils -y

Our internal team is checking on how to fix this in a better way.
Currently, please use above WAR as a temporal solution.

Thanks.

1 Like

This workaround no longer seems to work.

Is there a proper fix yet?

My procedure:

Step 1

I start up a pristine container using

docker run -it --rm --privileged -v /dev/bus/usb:/dev/bus/usb sdkmanager --cli install  --logintype devzone --product Jetson --target P3310-1000 --targetos Linux --version 4.5.1 --select "Jetson OS" --deselect "Jetson SDK Components" --flash all --license accept --staylogin true --datacollection disable

It drops me to the sdkmanager screen where I press an arrow button to stop the autoinstallation countdown.

Step 2

I open a second terminal and install the required packages into the container there. (Sidenote: On a fresh container, apt install binutils fails with 404 Not Found [IP: 91.189.88.152 80]; one has to run apt-get update before.) I made sure binutils is properly installed with dpkg -l binutils.

manuel@ProBook440G5:~/redacted/sdkmanager$ docker container ls
CONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS         PORTS     NAMES
0f4ba577187e   sdkmanager   "docker-entrypoint.s…"   2 minutes ago   Up 2 minutes             serene_davinci
manuel@ProBook440G5:~/vps/sdkmanager$ 
manuel@ProBook440G5:~/vps/sdkmanager$ docker exec 0f4ba577187e sudo dpkg -l binutils                    
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  binutils       <none>       <none>       (no description available)

manuel@ProBook440G5:~/redacted/sdkmanager$ docker exec 0f4ba577187e sudo apt install binutils -y

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  binutils-common binutils-x86-64-linux-gnu libbinutils
Suggested packages:
  binutils-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu libbinutils
0 upgraded, 4 newly installed, 0 to remove and 6 not upgraded.
Need to get 2527 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.4
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.4
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.4
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.4
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.4
  404  Not Found [IP: 91.189.88.152 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.4
  404  Not Found [IP: 91.189.88.152 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.4
  404  Not Found [IP: 91.189.88.152 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.4
  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-common_2.30-21ubuntu1~18.04.4_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/libbinutils_2.30-21ubuntu1~18.04.4_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.4_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.30-21ubuntu1~18.04.4_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

manuel@ProBook440G5:~/redacted/sdkmanager$ docker exec 0f4ba577187e sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [38.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2693 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [500 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [533 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2190 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [2257 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [31.5 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1420 kB]
Fetched 9915 kB in 2s (4142 kB/s)
Reading package lists...

manuel@ProBook440G5:~/redacted/sdkmanager$ docker exec 0f4ba577187e sudo apt install binutils -y

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  binutils-common binutils-x86-64-linux-gnu libbinutils
Suggested packages:
  binutils-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu libbinutils
0 upgraded, 4 newly installed, 0 to remove and 85 not upgraded.
Need to get 2528 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.5 [197 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.5 [489 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.5 [1839 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.5 [3388 B]
Fetched 2528 kB in 1s (4643 kB/s)
Selecting previously unselected package binutils-common:amd64.
(Reading database ... 39120 files and directories currently installed.)
Preparing to unpack .../binutils-common_2.30-21ubuntu1~18.04.5_amd64.deb ...
Unpacking binutils-common:amd64 (2.30-21ubuntu1~18.04.5) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../libbinutils_2.30-21ubuntu1~18.04.5_amd64.deb ...
Unpacking libbinutils:amd64 (2.30-21ubuntu1~18.04.5) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.5_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.5) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.30-21ubuntu1~18.04.5_amd64.deb ...
Unpacking binutils (2.30-21ubuntu1~18.04.5) ...
Setting up binutils-common:amd64 (2.30-21ubuntu1~18.04.5) ...
Setting up libbinutils:amd64 (2.30-21ubuntu1~18.04.5) ...
Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.5) ...
Setting up binutils (2.30-21ubuntu1~18.04.5) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...

manuel@ProBook440G5:~/redacted/sdkmanager$ docker exec 0f4ba577187e sudo dpkg -l binutils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                Architecture Description
+++-==============-======================-============-==========================================
ii  binutils       2.30-21ubuntu1~18.04.5 amd64        GNU assembler, linker and binary utilities

manuel@ProBook440G5:~/redacted/sdkmanager$

Step 3

I switch back to the other terminal where sdkmanager is waiting for me and hit enter. It fails.