Skip to content

Commit

Permalink
Fix dcgm installation on ubuntu 2304
Browse files Browse the repository at this point in the history
  • Loading branch information
LujieDuan committed Aug 17, 2023
1 parent 042b81a commit dfe9613
Showing 1 changed file with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,19 @@ set -e

sudo apt update
kernel_version=`uname -r`
sudo apt install -y linux-headers-${kernel_version} software-properties-common pciutils gcc make dkms
sudo apt install -y linux-headers-${kernel_version} software-properties-common pciutils gcc make dkms wget

BASE_URL=https://us.download.nvidia.com/tesla
DEVICE_CODE=$(lspci -n | grep -Po '10de:[\w\d]{4}')
DISTRIBUTION=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
case $DEVICE_CODE in
10de:102d)
# Install a specific version for NVIDIA Tesla K80
DRIVER_VERSION=460.106.00
;;
*)
DRIVER_VERSION=525.60.13
;;
esac
echo "Installing NVIDIA driver version $DRIVER_VERSION"
curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run
if [[ "${DISTRIBUTION}" == ubuntu2304 ]]; then
DISTRIBUTION = "ubuntu2004"
fi

sudo bash ./NVIDIA-Linux-x86_64-$DRIVER_VERSION.run --silent
curl https://raw.githubusercontent.com/GoogleCloudPlatform/compute-gpu-installation/main/linux/install_gpu_driver.py --output install_gpu_driver.py
sudo python3 install_gpu_driver.py

# check NVIDIA driver installation succeeded
nvidia-smi

sudo apt-get -y install wget

wget https://developer.download.nvidia.com/compute/cuda/repos/$DISTRIBUTION/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb

Expand Down

0 comments on commit dfe9613

Please sign in to comment.