Motherboard: Asrock B550M Pro4
CPU: Ryzen 5 5600G
RAM: 2x32GB 3200 DDR4
GPU: Nvidia 750 Ti (2GB)Proxmox: 8.1.10This guide benefited from various sources, including:
This comprehensive guide aims to streamline the integration process of Nvidia GPUs with Proxmox and LXC containers. It condenses knowledge from various sources into a practical, step-by-step format for ease of implementation.
Visit Nvidia's Driver download page and select the appropriate driver for your GPU.
Copy the download link and execute the following commands:
wget <YOUR_DRIVER_DOWNLOAD_LINK> -O driver.run
chmod +x ./driver.run
sudo ./driver.runEnsure the driver installation was successful by running:
nvidia-smiThe output should look similiar to this:
For a detailed understanding of device and group identification, refer to Jim's video.
ls -l /dev/dricat /etc/groupEdit the subgid file:
nano /etc/subgidReplace values with those obtained earlier.
Edit the LXC configuration file:
nano /etc/pve/lxc/<lxc-id>.confAdd the following lines:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 62
lxc.idmap: g 107 104 1
lxc.idmap: g 108 100108 65428
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=fileGrant root user access to necessary groups:
usermod -aG render,video rootOS: Ubuntu 22.04Follow the installation guide here, adapting steps as necessary.
Ensure consistency of Nvidia driver versions between Proxmox host and LXC.
wget <YOUR_DRIVER_DOWNLOAD_LINK> -O driver.run
chmod +x ./driver.run
sudo ./driver.run --no-kernel-moduleConfirm driver installation within LXC:
nvidia-smiThe output should look similiar to this:
Your LXC container is now configured to utilize the Nvidia GPU effectively. For scaling to additional LXCs, repeat the configuration steps outlined above.
For further inquiries or assistance, feel free to reach out:
Email: [email protected]
Discord: thijmengthn