Nvidia-container with GPU

Hi

Is there a way to know if nvidia-container works with GPU?

We installed nvidia-container by sdkmanager.

And check nvidia-container is installed with below command.

#sudo dpkg --get-selections | grep nvidia
libnvidia-container-tools install
libnvidia-container0:arm64 install
nvidia-container-runtime install
nvidia-docker2 install

However, as running
nvidia-container-cli command and got GPU UUID and Bus Location are null. ( see below)

aae@aae-desktop:~$ nvidia-container-cli info
NVRM version: (null)
CUDA version: 10.2Device Index: 0
Device Minor: 0
Model: Xavier
Brand: (null)
GPU UUID: (null)
Bus Location: (null)
Architecture: 7.2
aae@aae-desktop:~$ nvidia-container-cli --load-kmods info
NVRM version: (null)
CUDA version: 10.2Device Index: 0
Device Minor: 0
Model: Xavier
Brand: (null)
GPU UUID: (null)
Bus Location: (null)
Architecture: 7.2

Is nvidia-container-cli is proper way to know if the container works with GPU or not?

Is there a way to know if nvidia-container works with GPU?

Thank you for any advice,

Hi @HuiW, I haven’t used that nvidia-container-cli tool before, but it does seem to be detecting your GPU. On Jetson, normally you would use --runtime nvidia when you start the container. What version of JetPack-L4T are you on?

Hi Dusty_nv,

Thank you for your prompt support.
Would you address more " it does seem to be detecting your GPU?"

We did start the container with --runtime nvidia.
However, should I use nvidia-docker to replace docker to enable gpu in a container?

We did test Jetpack 4.6.2 and Jetpack5.0.2.

Thank you,

You should start the containers like the documentation shows on the container’s NGC page - you don’t need to use nvidia-docker, just docker with --runtime nvidia flag. For example, to check GPU in l4t-pytorch container on JetPack 5.0.2:

$ sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.12-py3
# python3 -c 'import torch; print(torch.cuda.is_available())'
# cd /usr/local/cuda/samples/1_Utilities/deviceQuery
# make
# ./deviceQuery

You could also run this test script in l4t-pytorch container that allocates some data on the GPU and runs some test kernels: https://github.com/dusty-nv/jetson-containers/blob/master/test/test_pytorch.py

Hi dusty_nv,

Thank you for providing the container.
And deviceQuery does show the information of CUDA and GPU on the container.

Thanks,

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