Skip to content

Commit

Permalink
hooks: include nvidia modprobe configuration from deb
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsosanchezbeato committed Nov 7, 2024
1 parent c82cfeb commit 1ec4638
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hooks/001-extra-packages.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,16 @@ rm snapd_*.deb

case "$(dpkg --print-architecture)" in
amd64|arm64)
# Copy nvidia udev rules and dependencies (sources for this come from
# Copy nvidia config files and dependencies (sources for this come from
# Canonical, not from Nvidia, see
# https://github.com/canonical/nvidia-graphics-drivers).
nvidia_common_pkg=nvidia-kernel-common-550
apt-get download "$nvidia_common_pkg"
dpkg --fsys-tarfile "$nvidia_common_pkg"_*.deb |
tar xf - ./sbin/ub-device-create ./lib/udev/rules.d/71-nvidia.rules
tar xf - \
./sbin/ub-device-create \
./lib/udev/rules.d/71-nvidia.rules \
./etc/modprobe.d/nvidia-graphics-drivers-kms.conf
rm "$nvidia_common_pkg"_*.deb
;;
esac

0 comments on commit 1ec4638

Please sign in to comment.