Merge patch for nvidia drivers to get LXC containers gpu access working

zenowl77

Member
Feb 22, 2024
85
11
8
found this github here:
https://github.com/VGPU-Community-Drivers/vGPU-Unlock-patcher

it includes patches for merging drivers and i managed to get it working on proxmox with 535.129.03 to get the nvidia_uvm kernel module installed and now LXC containers successfully can access the GPU and make use of it, tested with jellyfin and NVENC access.

i just downloaded the repo threw a copy of the nvidia .run driver files into the folder, (it extracts both the kvm and consumer driver you need to put both in the folder) ran the ./patch.sh general-merge command then cd into the -patched folder and ran ./nvidia-installer --dkms twice (failed the first time worked the second time) now proxmox 8.1.4 with kernel 6.5.11-8 is successfully running both vgpu and all the consumer driver features on my Nvidia Tesla P4 gpu

code added to LXC config in /etc/pve/lxc/*VMID*.conf
Code:
lxc.cgroup2.devices.allow: c 195:* rwm
lxc.cgroup2.devices.allow: c 195:255 rwm
lxc.cgroup2.devices.allow: c 10:144 rwm
lxc.cgroup2.devices.allow: c 509:* rwm
lxc.cgroup2.devices.allow: c 234:* rwm
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
lxc.mount.entry: /dev/nvram nvram none bind,optional,create=file
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!