Docker compatibility - different cuda versions

I have a Jetson Nano 2GB board with JetPack 4.6.
I try to use the L4T 32.6.1 (l4t-ml:r32.6.1-py3 and l4t-pytorch:r32.6.1-pth1.8-py3)docker images provided. These images are incompatible. torch.cuda.is_available() returns False in both containers.

I notice that on the cuda version on the OS is 10.2 while inside the containers, CUDA 11 is indicated.

I notice similar questions are asked regularly, but there seems to be no uniform answer to this problem.

How can I identify what docker image to use for JETPACK4.6 on a Jetson Nano 2GB with CUDA10.2 ?

Hi @jan.alexander, did you include --runtime nvidia in the docker run command you used to start the containers?

It’s unclear how that could be when JetPack 4 mounts CUDA into the container from the host device, and JetPack 4.6.x was always CUDA 10.2.

First, please run these to check your L4T and CUDA versions:

cat /etc/nv_tegra_release
cat /usr/local/cuda/version.txt

It’s possible you might actually have JetPack 4.6.1 (R32.7.1) or newer, instead of just JetPack 4.6 (R32.6). In any case, upgrading to the JetPack 4.6.1 SD card image would allow you to run the R32.7 containers that are more recent, and which I still have builds setup for like here:

Dear,

Thank you for your swift reply. Somehow this solved my problem. I am indeed capable to connect to the CUDA device now. This breaks down when trying to install openCV though.

I confirm that I work with JetPack 4.6.1 (R32.7.4) and this board has CUDA version 10.2.300:

...@localhost:~$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 7.4, GCID: 33514132, BOARD: t210ref, EABI: aarch64, DATE: Fri Jun  9 04:25:08 UTC 2023
...@localhost:~$ cat /usr/local/cuda/version.txt
CUDA Version 10.2.300

As suggested, I pull the docker suitable for this setup and run this:

 $ sudo docker pull nvcr.io/nvidia/l4t-pytorch:r32.7.1-pth1.9-py3
 $ sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-pytorch:r32.7.1-pth1.9-py3

Now I am able to connect to CUDA (torch.cuda.is_available() returns True). However, it is when I try to install Opencv that everything breaks down.

pip3 install opencv-python

This narrows down the problem a bit.

OK, glad that you got PyTorch working that way. Are you sure OpenCV isn’t already installed. You can also try dustynv/l4t-pytorch:r32.7.1 container. It was built more recently and already includes OpenCV built with CUDA enabled.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.