NVIDIA SDK Manager Docker

Introduction

Previously, we had to install NVIDIA SDKs on NVIDIA embedded systems using NVIDIA SDK Manager GUI. However, NVIDIA SDK Manager GUI might not be available on some host operating systems that we use and it would introduce some inconvenience to the users.

Recently, NVIDIA SDK Manager becomes available as Docker Images and we could install NVIDIA SDKs on NVIDIA embedded systems from any host operating systems that has Docker Engine installed.

In this blog post, I would like to discuss how to install NVIDIA SDKs using NVIDIA SDK Manager Docker Images.

Host Prerequisites

Docker Engine

The Docker Engine could be installed by following the Docker Installation Guide.

NVIDIA SDK Manager Docker Image

NVIDIA SDK Manager Docker Image could be downloaded from the NVIDIA SDK Manager Website. There are three versions of the Docker Image as of now, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04. Because each NVIDIA SDK only supports a limited set of Ubuntu versions, please make sure the compatible Docker Image is downloaded.

In this article, we are going to install NVIDIA JetPack 5.x which is only available for Ubuntu 18.04 and Ubuntu 20.04. Therefore, we will download an NVIDIA SDK Manager Docker Image of Ubuntu 20.04.

The NVIDIA SDK Manager Docker Image use the sdkmanager-[version].[build#]-[base_OS]_docker.tar.gz name pattern. In our case, we downloaded sdkmanager-1.9.2.10884-Ubuntu_20.04_docker.tar.gz. To load the Docker Image so that the Docker Engine can access, we could run the following command.

1
$ docker load -i ./sdkmanager-1.9.2.10884-Ubuntu_20.04_docker.tar.gz

Install Host Components

Even though the NVIDIA SDK could be installed on the device via the NVIDIA SDK Manager Docker container, there are some additional host components required for installing the NVIDIA SDK successfully on the device.

1
2
3
4
$ sudo apt update
$ sudo apt install -y qemu-user-static binfmt-support
$ sudo update-binfmts --enable
$ sudo killall adb

Without performing these operations, the installation might just fail in a creepy way and the error messages would just not be helpful for debugging.

Cache Directory

It’s possible to cache the downloaded NVIDIA SDK system files on the host. We will create a directory $(pwd) for saving all the files used for NVIDIA installation for future usages.

NVIDIA SDK Manager Docker

Query Available SDKs

We could query the available NVIDIA SDKs using the NVIDIA SDK Manager Docker

1
$ docker run -it --rm sdkmanager:1.9.2.10884-Ubuntu_20.04 --query

These are all the available NVIDIA SDKs as of now.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
JetPack 5.1.1
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_AGX_ORIN_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_ORIN_NX_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_ORIN_NANO_TARGETS --flash all

JetPack 5.1 (rev. 1)
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all --additionalsdk 'DeepStream 6.2'
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all --additionalsdk 'DeepStream 6.2'
sdkmanager --cli install --logintype devzone --product Jetson --version 5.1 --targetos Linux --host --target JETSON_AGX_ORIN_TARGETS --flash all --additionalsdk 'DeepStream 6.2'

JetPack 5.0.2 (rev. 2)
sdkmanager --cli install --logintype devzone --product Jetson --version 5.0.2 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all --additionalsdk 'DeepStream 6.1.1'
sdkmanager --cli install --logintype devzone --product Jetson --version 5.0.2 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all --additionalsdk 'DeepStream 6.1.1'
sdkmanager --cli install --logintype devzone --product Jetson --version 5.0.2 --targetos Linux --host --target JETSON_AGX_ORIN_TARGETS --flash all --additionalsdk 'DeepStream 6.1.1'

JetPack 5.0.2 Runtime (rev. 2)
sdkmanager --cli install --logintype devzone --product Jetson --version Runtime_5.0.2 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version Runtime_5.0.2 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all
sdkmanager --cli install --logintype devzone --product Jetson --version Runtime_5.0.2 --targetos Linux --host --target JETSON_AGX_ORIN_TARGETS --flash all

JetPack 4.6.3
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --host --target JETSON_TX2_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --host --target JETSON_TX1_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --host --target JETSON_NANO_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04

JetPack 4.6.2
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.2 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.2 --targetos Linux --host --target JETSON_XAVIER_NX_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.2 --targetos Linux --host --target JETSON_TX2_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.2 --targetos Linux --host --target JETSON_TX1_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04
sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.2 --targetos Linux --host --target JETSON_NANO_TARGETS --flash all --additionalsdk 'DeepStream 6.0.1'
* Available on host OS: ubuntu16.04, ubuntu18.04


Query completed.

Because my device is an NVIDIA AGX Xavier and the JetPack SDK version that I want to install is 5.1.1, the base installation command as returned by the NVIDIA SDK Manager is

1
$ sdkmanager --cli install --logintype devzone --product Jetson --version 5.1.1 --targetos Linux --host --target JETSON_AGX_XAVIER_TARGETS --flash all

NVIDIA SDK Docker Installation

To install the NVIDIA JetPack SDK 5.1.1 on my NVIDIA AGX Xavier, make sure the USB-C port on the front of the device at the right of the power light indicator is connected to the host, make sure the device is turned on with recovery mode by pressing and holding the middle button, followed by pressing and holding the left button, and releasing together.

Then we could just run the following command to install the NVIDIA SDK via Docker.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ docker run -it --rm --privileged --network host \
-v /dev/bus/usb:/dev/bus/usb/ \
-v /dev:/dev \
-v /media/$USER:/media/nvidia:slave \
-v $(pwd):/home/nvidia/Downloads/nvidia/sdkm_downloads \
sdkmanager:1.9.2.10884-Ubuntu_20.04 \
--cli install \
--logintype devzone \
--product Jetson \
--version 5.1.1 \
--targetos Linux \
--host \
--target JETSON_AGX_XAVIER_TARGETS \
--flash all \
--downloadfolder /home/nvidia/Downloads/nvidia/sdkm_downloads \
--license accept \
--staylogin true \
--datacollection enable \
--exitonfinish
NVIDIA SDK Manager Docker

When the NVIDIA SDK host components have been installed, to install the NVIDIA SDK device components, we need to ensure selecting the “Manual Setup - Jetson AGX Xavier” for the SDK target installation. For the other option selections, we can just use the default ones.

Installing SDK Target Components

Once the OS has been installed on the device, we will have to configure the device OS and set up an user account on the device from the “System Configuration Wizard”. This cannot be done via the NVIDIA SDK Manager Docker currently. Instead, we will have to open a new terminal from the host, run screen to connect to the device OS terminal via /dev/ttyACM0. In the configuration process, internet connection needs to be configured. I used an internet cable that connects the device to the Internet router. As of now, the internet connection from the device is a must. Without it, the SDK target component installations will fail.

1
2
3
$ sudo apt update
$ sudo apt install -y screen
$ sudo screen /dev/ttyACM0

Once the screen connection has been created, press “Enter” and we could follow the instructions and complete the “System Configuration Wizard”. This also allows us to create an account which can be used in the NVIDIA SDK Manager to complete the SDK target component installations.

System Configuration Wizard

Once the “System Configuration Wizard” is complete, we could use the user account that we just created and complete the installation of the rest of the SDK components.

Installing SDK Target Components

Post-Installation Setup

Once the installation is complete. We can turn off the device, move the device to a new place, and get it connected to internet. To query its IP address, we could connect the device to a laptop via USB-C and use the same screen command to log into the OS and check the IP address using ifconfig from the device.

1
2
3
$ sudo apt update
$ sudo apt install -y net-tools
$ ifconfig

Going forward, we could access the device using SSH.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$ ssh leimao@192.168.0.28
leimao@192.168.0.28's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.104-tegra aarch64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

* Introducing Expanded Security Maintenance for Applications.
Receive updates to over 25,000 software packages with your
Ubuntu Pro subscription. Free for personal use.

https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

72 updates can be applied immediately.
55 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

30 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

Last login: Sun Apr 2 23:58:47 2023 from 192.168.0.19

On the device, we could confirm the SDK installation using tegrastats.

1
2
3
$ tegrastats
04-03-2023 00:36:08 RAM 796/31011MB (lfb 7342x4MB) SWAP 0/15505MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@35C CPU@36C thermal@35.8C Tboard@37C AO@35.5C GPU@36C Tdiode@38.25C PMIC@50C
04-03-2023 00:36:09 RAM 796/31011MB (lfb 7342x4MB) SWAP 0/15505MB (cached 0MB) CPU [1%@1190,0%@1190,0%@1190,0%@1190,off,off,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@35C CPU@36C thermal@35.75C Tboard@37C AO@35C GPU@36C Tdiode@38.25C PMIC@50C

References

Author

Lei Mao

Posted on

04-16-2023

Updated on

04-16-2023

Licensed under


Comments