I’m trying to get the containers running on my Jetson Xavier AGX to use the GPU.
I’ve followed these instructions and also these and I do see everything I should when validating:
$ sudo dpkg --get-selections | grep nvidia
libnvidia-container-tools install
libnvidia-container0:arm64 install
libnvidia-container1:arm64 install
nvidia-container-runtime install
nvidia-container-toolkit install
nvidia-docker2 install
nvidia-l4t-3d-core install
nvidia-l4t-apt-source install
nvidia-l4t-bootloader install
nvidia-l4t-camera install
nvidia-l4t-configs install
nvidia-l4t-core install
nvidia-l4t-cuda install
nvidia-l4t-display-kernel install
nvidia-l4t-firmware install
nvidia-l4t-gputools install
nvidia-l4t-graphics-demos install
nvidia-l4t-gstreamer install
nvidia-l4t-init install
nvidia-l4t-initrd install
nvidia-l4t-jetson-io install
nvidia-l4t-jetson-multimedia-api install
nvidia-l4t-jetsonpower-gui-tools install
nvidia-l4t-kernel install
nvidia-l4t-kernel-dtbs install
nvidia-l4t-kernel-headers install
nvidia-l4t-libvulkan install
nvidia-l4t-multimedia install
nvidia-l4t-multimedia-utils install
nvidia-l4t-nvfancontrol install
nvidia-l4t-nvpmodel install
nvidia-l4t-nvpmodel-gui-tools install
nvidia-l4t-nvsci install
nvidia-l4t-oem-config install
nvidia-l4t-optee install
nvidia-l4t-pva install
nvidia-l4t-tools install
nvidia-l4t-wayland install
nvidia-l4t-weston install
nvidia-l4t-x11 install
nvidia-l4t-xusb-firmware install
AND
$ sudo docker info | grep nvidia
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux nvidia runc
However, when I try to run some cuda
base image:
sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi
Or via docker-compose:
services:
test:
image: nvidia/cuda:10.2-base
command: nvidia-smi
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
I get the following error:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'csv'
invoking the NVIDIA Container Runtime Hook directly (e.g. specifying the docker --gpus flag) is not supported. Please use the NVIDIA Container Runtime instead.: unknown.
Last thing to mention is the device is running without a screen attached (headless) in case it matters?
Any thoughts on how to pass the GPU to the docker containers?