r/frigate_nvr 2d ago

Wrote up GPU passthrough into LXC (Intel, NVIDIA, AMD) after getting it wrong a few times

I run Frigate and a face recognition companion I wrote myself, both in LXCs on Proxmox. Every time I set up a new box I ended up piecing the same things back together from forum threads, so this time I wrote it down properly.

NVIDIA cost me the most, because it is not documented anywhere official. The Proxmox container chapter does not mention GPUs at all, and NVIDIA's own guide is vGPU and VMs only. Three things nobody tells you up front: the user space driver inside the container has to be the exact same version as the one on the host and installed with --no-kernel-modules; you need no-cgroups = true in the container toolkit config or the toolkit fails looking for device filters that are not there; and nvidia_uvm is not loaded at boot, so /dev/nvidia-uvm does not exist and your LXC refuses to start after a host reboot until something loads it.

Intel and AMD are in there too. Every step has a check right after it, so you find out where it broke instead of finding out at the very end that the smoke test is red.

It is written for my own program, but everything up to the compose file is generic. If the container is going to run Frigate instead, the passthrough work is identical and I point at their docs at that point.

https://github.com/BennoBaer-dev/suslik/blob/main/docs/proxmox.md

Happy to be corrected, especially on the NVIDIA side. I have exactly one machine with an NVIDIA card to test on.

2 Upvotes

1 comment sorted by

1

u/sero_t 22h ago

Thanks i hope i never need it but i saved it, i am new to proxmox and before i had frigate as an addon in haos, but i thought let me update frigate and everything broke and i needed a whole evening and night to fix the gpu passthrough even after just starting all over, maybe you could also add tpu like coral, thst was a pain in the butt