I have to use Podman on the Nvidia Jetson Xavier NX and I am trying to pass through the onboard GPU via Nvidia Container Runtime and Hook. However, I am having issues trying to start any containers which include ubuntu arm64 and L4T.
The run command and resulting error is shown below:
After I installed nvidia-container-toolkit and nvdia-container-runtime it did not install nvidia-container-runtime-hook as shown by the list above. Has this package been archived or is it meant to be installed? I manually created the oci-nvidia-hook.json file within the /oci/hooks.d/ directory.
I have used podman on a Centos 8 stream machine and managed to pass through the GPU into numerous containers. I also do not know how to create the nvidia runtime within the podman configuration file (containers.conf) [I have searched and found no implementation in podman] and am not sure if it is needed for the hook to work, as there was no nvidia runtime within the containers.conf file on the Centos 8 machine.
I have managed to fix the OCI runtime error and pass through the Xavier GPU into the Podman container. However, I now get a permission issue in regards to using the GPU if I start the container as a non-root user. When executing the deviceQuery sample I get the following error:
NvRmMemInitNvmap failed with Permission denied
549: Memory Manager Not supported
****NvRmMemInit failed**** error type: 196626
*** NvRmMemInit failed NvRmMemConstructor
I do not get permission denied if I run the Podman container as root, but I need to run the container as a user with non-root privileges. I have tried adding $USER to video,i2c groups and it did not solve the issue.
Are there files on the host that link to the gpu which I can change the permissions of?
My issue is that I am trying to run the podman container as a non-root user on the host, not a non-root user within the container. eg. “podman run -it …”, not “sudo podman run -it …”.
I have ran podman as a root user using sudo and it does have the permissions to use the GPU within the container which is equivalent to docker (I have tried docker and it also worked). However, I am required to use podman as a non-root user on the host.