Enabling Jetson Containers on an x86_64 Workstation using QEMU

Hi all,

I am developing software for NVIDIA Jetson. To improve the development process, I intend to use Docker and have some questions on this topic:

I was able to run an NVIDIA Jetson Container (l4t-base:r.32.5.0) on a Linux Ubuntu 20.04 x86_64 workstation using Docker, Nvidia-Docker2 and QEMU (as suggested by NVIDIA Container Runtime on Jetson · NVIDIA/nvidia-docker Wiki · GitHub).

However, I was not able to compile software that relies on CUDA because I miss some CUDA libraries (which are automatically included in the container on the Jetson since these files are mounted in some way). To address this shortcoming on the workstation, is there a way to manually install CUDA version 10.2 (and other libraries like CuDNN)? So far, I have only found versions starting from 11.0 for ARM.

Moreover, I noticed the “Known limitation: Unfortunately you won’t be able to run any binary that calls into the NVIDIA driver on the x86 host”. Is it technically possible to do this and is NVIDIA working on including this feature in a future version of Nvidia-Docker? I would be happy if you do, as I also want to test and consequently run the software in the docker container as part of the development process. If this is not possible, can you suggest any alternatives?

Thank you in advance for your support.

Hi,

You will need a CUDA cross compiler package for this.
This tool can be found in the CUDA package for host from JetPack.

Unfortunately, you still need to run the binary directly on the Jetson device.
Due to the hardware difference, we don’t support to run a ARM binary on the x86 host.

It’s recommended to compile the binary on host and apply the fully testing on Jetson directly.

Thanks.

Hi @AastaLLL,

Thank you for your answer. It is helpful and shows that my original idea is not technically possible.

I would like to add some insight I have gained that might help others who have the same idea I had:

As you suggested, a CUDA cross compiler package can be used. However, I found an alternative for cross compilation using docker and qemu (Cross-compilation for Jetson TX2 using QEMU, Docker | Medium). It is easy to use (I have integrated it into my CI/CD pipeline) and works flawless so far.

In order to test (and run) my software, I use an x_86 docker image that contains the same versions of CUDA, TensorRT, PyTorch, etc. as the Jetson. Usually the two systems are compatible. Sometimes I had to customize something on the Jetson. Nevertheless, this approach allows me to test the software in general.

3 Likes