




















I've hit the same problem, and looking for a clean way to do this. I need to pass the gpu through to lxc, then to docker. I know this isn't the recommended setup, but it can work, and its the least performance hit and easiest maintenance, in my opinion.
Both of these tutorials do work and do exactly that:
- https://sluijsjes.nl/2024/05/18/cor...to-install-frigate-video-surveillance-server/
- https://digitalspaceport.com/proxmox-lxc-gpu-passthru-setup-guide/
However, this requires manually installing the drivers on the host and all lxc containers that need the gpu. I need to pass this to more than one lxc. Maintaining this will be a nightmare, especially since I (and both of those tutorials) installed it manually, not through apt. I will probably never even update, out of fear of it falling apart.
Does anyone know of a verified method that would only have the drivers on the host, and everything is passed through lxc containers?
I've tried deleting the drivers from the lxc, and adding passthroughs like this (in different combinations of .so files):
Code:
lxc.mount.entry: /usr/bin/nvidia-smi usr/bin/nvidia-smi none bind,optional,create=file
lxc.mount.entry: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so usr/lib/x86_64-linux-gnu/libnvidia-ml.so none bind,optional,create=file
lxc.mount.entry: /usr/lib/x86_64-linux-gnu/libcuda.so usr/lib/x86_64-linux-gnu/libcuda.so none bind,optional,create=file
lxc.environment: LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu
I can post more details if someone if willing to have a look, but i was wondering is there a working tutorial out there that I missed. I've spent hours on this, and abusing chatgpt to somehow solve it, but failed in all attempts. Mostly, it can't find libnvidia-ml.so event though its mounted.
Side note: in both of these tutorials the mapping can be simplified, to map the devices through the webui, without doing manual mount entries, cgroups etc. At least it works for me, provided that I install the no-kernel driver on the lxc (same as the tutorials do).
Code:
dev0: /dev/nvidia0
dev1: /dev/nvidiactl
dev2: /dev/nvidia-uvm
dev3: /dev/nvidia-uvm-tools
dev4: /dev/nvidia-caps/nvidia-cap1
dev5: /dev/nvidia-caps/nvidia-cap2
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。