Describe the feature
Recently drivers in beta are 595 which are unable for lxc image
I have to create some mod for your script
#!/usr/bin/env bash
# SCRIPT_DESC: Install NVIDIA Cuda and Kernel drivers
# SCRIPT_DETECT: command -v nvidia-smi &>/dev/null
echo ">>> Pinning NVIDIA driver version to 590.48.01"
cat <<EOF > /etc/apt/preferences.d/nvidia-pin
Package: *nvidia* libcuda* libnv* firmware-nvidia-gsp
Pin: version 590.48.01*
Pin-Priority: 1001
EOF
apt update
echo ">>> Installing Proxmox headers for current kernel"
apt install -y proxmox-headers-"$(uname -r)"
echo ">>> Downloading and installing NVIDIA CUDA keyring"
wget https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-keyring_1.1-1_all.deb
dpkg -i cuda-keyring_1.1-1_all.deb
rm cuda-keyring_1.1-1_all.deb
apt update
echo ">>> Installing NVIDIA driver packages"
# Because of the pin we set above, apt will automatically grab the 590 version for everything.
apt install -y nvidia-driver-cuda nvidia-kernel-dkms
echo ">>> Please reboot the system now"
then LXC was able to install drivers
- would be good to specify which driver to install if some are in beta choosing from:
apt list -a nvidia-driver-cuda
Also after host reboot we can loos
dev/nvidia-modeset
dev/nvidia-uvm (missing)
prevent it
nano /etc/systemd/system/nvidia-nodes.service
then
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
[Unit]
Description=Create NVIDIA device nodes on boot
After=systemd-modules-load.service
[Service]
Type=oneshot
# Creates /dev/nvidia0 and /dev/nvidiactl
ExecStart=/usr/bin/nvidia-modprobe
# Creates /dev/nvidia-modeset
ExecStart=/usr/bin/nvidia-modprobe -m
# Creates /dev/nvidia-uvm and /dev/nvidia-uvm-tools
ExecStart=/usr/bin/nvidia-modprobe -c0 -u
RemainAfterExit=yes[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable --now nvidia-nodes.service
Additional information
Final checks
Describe the feature
Recently drivers in beta are 595 which are unable for lxc image
I have to create some mod for your script
then LXC was able to install drivers
apt list -a nvidia-driver-cudaAlso after host reboot we can loos
prevent it
nano /etc/systemd/system/nvidia-nodes.servicethen
Additional information
Final checks