Nvidia Jetson Nano with docker

I am running a custom Yocto image on the Nvidia Jetson Nano that has docker-ce (v19.03.2) included. I am able to run docker without problems.

The problem comes when I want to use docker for vision testing. I need access to host side CUDA and tensorRT. This is accessed through the Nvidia Container Runtime on top of the docker-ce. I have installed Nvidia Container Runtime (v0.9.0 beta) manually (extracted the necessary .deb packages and copy pasted them into the rootfs) to test on my build, and it seems to be working fine.

When I run docker info I can see that the nvidia runtime is available, and it doesn’t complain when I run a docker with docker run -it --runtime=nvidia image .

If i run deviceQuery test OUTSIDE docker, i get the following:

$ /usr/bin/cuda-samples/deviceQuery
CUDA Driver Version / Runtime Version          10.0 / 10.0
CUDA Capability Major/Minor version number:    5.3
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.0, CUDA Runtime Version = 10.0, NumDevs = 1
Result = PASS

However, when I want to run deviceQuery IN a docker to test CUDA availability, it fails:

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Where the Dockerfile is as follows:

FROM nvcr.io/nvidia/l4t-base:r32.2

COPY ./deviceQuery /tmp/deviceQuery


CMD ["./deviceQuery"]

So my questions are these:

Why does the deviceQuery test fail inside the docker even though I have Nvidia Container Runtime installed with docker? - and how can i fix it this issue?
More on this on this: https://devtalk.nvidia.com/default/topic/1070320/cuda-setup-and-installation/nvidia-container-runtime-on-jetson-nano-using-yocto/post/5422425/#5422425extensionllc from nvidia devtalk.


It seems that the GPU driver of the container is incompatible with the library of the Nano native.
So you can run deviceQuery natively but meet errors within the docker.

Could you check which JetPack do you use for Nano first?

$ cat /etc/nv_tegra_release

Then please try to use the same l4t-base to see if it works.


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