LXC gpu passthrough

GPU passthrough can be useful for media encodings, AI or other GPU required tasks

Update config

Simply update the lxc container config

/etc/pve/lxc/xxx.conf

1
2
3
4
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
All rights reserved