Troubleshoot GPU access with test containers
To troubleshoot device status or verify graphics processing unit (GPU) access on Red Hat Enterprise Linux (RHEL) on NVIDIA Jetson devices, use the official NVIDIA Linux for Tegra (L4T) JetPack container to run device queries and CUDA samples.
Procedure
-
Pull the
NVIDIA L4T JetPackcontainer image:$ sudo podman pull nvcr.io/nvidia/l4t-jetpack:r36.4.0 -
Run a GPU device query to verify containerized access:
$ sudo podman run --rm -it \ --device nvidia.com/gpu=all \ --group-add keep-groups \ --security-opt label=disable \ nvcr.io/nvidia/l4t-jetpack:r36.4.0 nvidia-smi -
Build and run CUDA sample applications for comprehensive GPU performance testing:
-
Install
gittemporarily on the host and clone the CUDA samples repository:$ sudo dnf install -y --transient git$ cd ${HOME}$ git clone -b v12.2 https://github.com/NVIDIA/cuda-samples.git -
Optional: If running with an active desktop environment, configure display server permissions:
export DISPLAY=:0 xhost +local: -
Start the L4T JetPack container with GPU access and the CUDA samples directory mounted:
$ podman run --rm -it \ -e DISPLAY --net=host \ --device nvidia.com/gpu=all \ --group-add keep-groups \ --security-opt label=disable \ -v ${HOME}/cuda-samples:/cuda-samples \ nvcr.io/nvidia/l4t-jetpack:r36.4.0 -
Inside the container, install the required build dependencies:
$ sudo apt update$ sudo apt install -y libglfw3 libglfw3-dev libdrm-dev pkg-config cmake -
Compile the
CUDAsamples:# cd /cuda-samples# make clean# make -j$(nproc) -
Run the sample applications to verify GPU rendering and compute capability:
# ./bin/aarch64/linux/release/deviceQuery# ./bin/aarch64/linux/release/particles# ./bin/aarch64/linux/release/nbody -fullscreen
-
Install