diff --git a/_Inbox/2026-04-27 2233 setting up gpu with proxmox lxc.md b/_Inbox/2026-04-27 2233 setting up gpu with proxmox lxc.md index e1ef32d..1726135 100644 --- a/_Inbox/2026-04-27 2233 setting up gpu with proxmox lxc.md +++ b/_Inbox/2026-04-27 2233 setting up gpu with proxmox lxc.md @@ -42,3 +42,19 @@ WantedBy=multi-user.target - systemctl daemon-reload - systemctl enable --now nvidia-monitor.service +- to pass the gpu to the container + - exec `ls -l /dev/nvidia*` + - edit `/etc/pve/lxc/ID.conf` + - add following line, adjust using values from above +``` +# Allow the container to access the GPU devices +lxc.cgroup2.devices.allow: c 195:* rwm +lxc.cgroup2.devices.allow: c 511:* rwm + +# Pass through the device files +lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file +lxc.mount.entry: /dev/nvidia1 dev/nvidia1 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-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file +``` \ No newline at end of file