From bd4cc7c5d60bfff2913108e1e6d77b6999d2277d Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Sun, 27 Sep 2020 18:05:12 +0800 Subject: [PATCH] [bugfix] linux-header only required by 18.04 --- deeplearning/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deeplearning/install.sh b/deeplearning/install.sh index 424e15b..ca5db8d 100755 --- a/deeplearning/install.sh +++ b/deeplearning/install.sh @@ -9,11 +9,10 @@ $ROOT/python/install.sh # install deep learning tools case "$PM" in apt) - # cuda dependencies - sudo apt install linux-headers-$(uname -r) - + # cuda source /etc/lsb-release if [ "$DISTRIB_RELEASE" = "18.04" ] && [ "$(uname -m)" = 'x86_64' ]; then + sudo apt install linux-headers-$(uname -r) wget 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 sudo apt-key adv --fetch-keys \ @@ -27,6 +26,8 @@ case "$PM" in echo 'Unsupported release' exit -1 fi + + # nvidia docker distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \