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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
$ 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.