fedora install fixes (#609)

This commit is contained in:
Bruce MacDonald 2023-09-27 11:43:47 -04:00 committed by GitHub
parent ed20837f9a
commit a2b210130f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,12 +216,13 @@ fi
if ! lsmod | grep -q nvidia; then if ! lsmod | grep -q nvidia; then
KERNEL_RELEASE="$(uname -r)" KERNEL_RELEASE="$(uname -r)"
case $OS_NAME in case $OS_NAME in
centos|rhel|rocky|fedora|amzn) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;; centos|rhel|rocky|amzn) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;;
fedora) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE ;;
debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;; debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;;
*) exit ;; *) exit ;;
esac esac
NVIDIA_CUDA_VERSION=$($SUDO dkms status | awk -F: '/added/ { print $1 }') NVIDIA_CUDA_VERSION=$($SUDO dkms status | awk -F: '/nvidia|added/ { print $1 }')
if [ -n "$NVIDIA_CUDA_VERSION" ]; then if [ -n "$NVIDIA_CUDA_VERSION" ]; then
$SUDO dkms install $NVIDIA_CUDA_VERSION $SUDO dkms install $NVIDIA_CUDA_VERSION
fi fi