Podman container gpu access and non-default user account

Hi guys,

I have tried for a long time to setup and configure a user account other than the default account setup by the TW installer to use nVidia/AMD GPUs with podman (rootless). So far, I have not had any luck.

The most frustrating thing is I have no problems using GPUs with the default user account through podman cdi and whatnot. The primary account works flawlessly with both nVidia and AMD GPUs with podman.

The issue occurs only when I add an extra account that I add with useradd.

With nVidia GPUs,
I get error messages along the line of NVML: permission denied

With AMD GPUs,
I get error messages like:

TU: error: ../src/freedreno/vulkan/tu_knl.cc:369: failed to open device /dev/dri/renderD128 (VK_ERROR_INCOMPATIBLE_DRIVER) ggml_vulkan: No devices found.

It looks like the GPU devices are off-limits for the extra account somehow.

So far, I have tried:

  • adding the extra account to video and render groups
  • adding the account to wheel group
  • making sure that uid and gid line up
  • checking /dev/dri permissions
  • adding container types for selinux and checking AVC for errors
  • passing in /dev/dri as devices parameters when running podman compose
  • passing in usern_ns parameters when running podman compose
  • changing the runtime to runc to crun for podman

I am fairly new to SUSE TW, and I am out of ideas as to how to figure out and resolve the issue.

I think I am going to need some help if I am ever going to figure this out.

What have I missed? Any pointers?