Skip to content

Commit

Permalink
hooks: include nvidia rules only for supported arches
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsosanchezbeato committed Oct 30, 2024
1 parent 478e0db commit f49c044
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions hooks/001-extra-packages.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,15 @@ dpkg --fsys-tarfile snapd_*.deb |
tar xf - ./usr/lib/systemd/system-generators/snapd-generator
rm snapd_*.deb

# Copy nvidia udev rules 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

case "$(dpkg --print-architecture)" in
amd64|arm64)
# Copy nvidia udev rules 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
;;
esac

0 comments on commit f49c044

Please sign in to comment.