Nvidia GPU Acceleration in Proxmox 7 LXC Container

Server Version#: 1.25.2.5319
Player Version#: n/a

Wanted to share my experience configuring a Proxmox 7 LXC container with an Nvidia GPU here. I encountered an error during the setup that I couldn’t find while searching the forum. Hopefully it helps anyone else out there wrestling with this setup.

I followed @constiens excellent post here - Plex HW acceleration in LXC container - anyone with success? - #35 by constiens. I used Nvidia driver version 495.46 and Proxmox v7. I was able to install the driver and transcode patch on my hypervisor with no issue.

When I proceeded to configure the container (Ubuntu v 21.04) I encountered an error running “nvidia-smi” to verify the driver installation. This command would return “Failed to initialize NVML: Unknown Error” and hardware transcoding would not function within PMS.

I found that Proxmox v7 has changed to a cgroup v2 environment, as described in this thread on the Proxmox forums - [SOLVED] - PVE 7.0 LXC Intel Quick Sync passtrough not working anymore | Proxmox Support Forum

So when modifying your container .conf file (nano /etc/pve/lxc/[nnn].conf), you must specify cgroup2:

lxc.**cgroup2**.devices.allow: c [nnn]:* rwm
lxc.**cgroup2**.devices.allow: c [nnn]:* rwm

Maybe this is obvious to others but I was scratching my head for a while on it.

3 Likes

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