Skip to content

Commit 6a5963c

Browse files
committed
sle15: Do not install distro version of open driver when building one from CUDA
The SUSE's version of the NVIDIA driver has 'Supplements:' on PCI device IDs. These cause the open driver to be installed on machines which happen to have a matching NVIDIA card when the kernel is installed. Use a not-well-known trick to work around this. Signed-off-by: Egbert Eich <[email protected]>
1 parent 17a584e commit 6a5963c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sle15/nvidia-driver

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,13 @@ _install_prerequisites() (
7070

7171
echo "Installing Linux kernel source..."
7272
local version_without_flavor=$(echo ${KERNEL_VERSION} | cut -d- -f-2)
73+
export ZYPP_MODALIAS_SYSFS=$(mktemp /tmp/modalias-XXXX)
7374
if ! zypper --non-interactive in -y --no-recommends --capability kernel-${FLAVOR} = ${version_without_flavor} kernel-${FLAVOR}-devel = ${version_without_flavor} ; then
7475
echo "FATAL: failed to install kernel packages. Ensure SLES subscription is available."
76+
rm -f ${ZYPP_MODALIAS_SYSFS}
7577
exit 1
7678
fi
79+
rm -f ${ZYPP_MODALIAS_SYSFS}; unset ZYPP_MODALIAS_SYSFS
7780

7881
echo "Generating Linux kernel version string..."
7982
extract-vmlinux /boot/vmlinuz-${KERNEL_VERSION} | strings | grep -E '^Linux version' | sed 's/^\(.*\)\s\+(.*)$/\1/' > version

0 commit comments

Comments
 (0)