From 5c5d80f9834f919a7aa09bd14cf609727c39223f Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Wed, 13 Jan 2021 20:21:20 -0500 Subject: [PATCH] Updated cudnn/cuda script style Signed-off-by: Gines Hidalgo --- scripts/ubuntu/install_cuda.sh | 10 +++++----- scripts/ubuntu/install_cudnn.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/ubuntu/install_cuda.sh b/scripts/ubuntu/install_cuda.sh index b0e98d5e..7c0552be 100755 --- a/scripts/ubuntu/install_cuda.sh +++ b/scripts/ubuntu/install_cuda.sh @@ -4,20 +4,20 @@ echo "NOTE: This script assumes Ubuntu 20 or 18 (Nvidia Graphics card >= 10XX), echo "Otherwise, install it by yourself or it might fail." # Install CUDA 8.0 -ubuntu_version="$(lsb_release -r)" +UBUNTU_VERSION="$(lsb_release -r)" sudo apt-get update && sudo apt-get install wget -y --no-install-recommends -if [[ $ubuntu_version == *"14."* ]]; then +if [[ $UBUNTU_VERSION == *"14."* ]]; then wget -c "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb" sudo dpkg --install cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb sudo apt-get update sudo apt-get install cuda-8-0 -elif [[ $ubuntu_version == *"16."* ]]; then +elif [[ $UBUNTU_VERSION == *"16."* ]]; then wget -c "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb" sudo dpkg --install cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb sudo apt-get update sudo apt-get install cuda-8-0 # Install CUDA 10.0 -elif [[ $ubuntu_version == *"18."* ]]; then +elif [[ $UBUNTU_VERSION == *"18."* ]]; then wget -c "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin" sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb @@ -26,7 +26,7 @@ elif [[ $ubuntu_version == *"18."* ]]; then sudo apt-get update sudo apt-get -y install cuda # Install CUDA 11.0 -elif [[ $ubuntu_version == *"20."* ]]; then +elif [[ $UBUNTU_VERSION == *"20."* ]]; then wget -c "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin" sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb" diff --git a/scripts/ubuntu/install_cudnn.sh b/scripts/ubuntu/install_cudnn.sh index 3ed36ad0..e0d6f4c1 100755 --- a/scripts/ubuntu/install_cudnn.sh +++ b/scripts/ubuntu/install_cudnn.sh @@ -3,7 +3,7 @@ echo "This script assumes Ubuntu 16 or 14 and Nvidia Graphics card up to 10XX. Otherwise, it will fail." # Install cuDNN 5.1 -ubuntu_version="$(lsb_release -r)" +UBUNTU_VERSION="$(lsb_release -r)" if [[ $UBUNTU_VERSION == *"14."* ]] || [[ $UBUNTU_VERSION == *"15."* ]] || [[ $UBUNTU_VERSION == *"16."* ]]; then CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz" wget -c ${CUDNN_URL} -- GitLab