From 079a093c532bb8da33216f6da2e4434760a17a8e Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 11 Aug 2021 19:30:49 +0200 Subject: [PATCH] More sudo commands for nvidia installation --- .../docker/lib/_install_nvidia_docker.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jenkins-scripts/docker/lib/_install_nvidia_docker.sh b/jenkins-scripts/docker/lib/_install_nvidia_docker.sh index 329fdea87..8e766acbf 100644 --- a/jenkins-scripts/docker/lib/_install_nvidia_docker.sh +++ b/jenkins-scripts/docker/lib/_install_nvidia_docker.sh @@ -1,7 +1,7 @@ INSTALL_NVIDIA_DOCKER1=""" echo '# BEGIN SECTION: install docker (in docker)' -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable\" +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable\" sudo apt-get update sudo apt-get install -y docker-ce echo '# END SECTION' @@ -9,24 +9,24 @@ echo '# END SECTION' echo '# BEGIN SECTION: install nvidia-docker1 (in docker)' sudo apt-get install -y wget nvidia-340 nvidia-modprobe wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb -dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb +sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb echo '# END SECTION' """ INSTALL_NVIDIA_DOCKER2=""" echo '# BEGIN SECTION: install docker (in docker)' -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable\" +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable\" sudo apt-get update # sudo apt-get install -y docker-ce echo '# END SECTION' echo '# BEGIN SECTION: install nvidia-docker2 (in docker)' curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ - apt-key add - + sudo apt-key add - distribution=\$(. /etc/os-release;echo \$ID\$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/\$distribution/nvidia-docker.list | \ - tee /etc/apt/sources.list.d/nvidia-docker.list + sudo tee /etc/apt/sources.list.d/nvidia-docker.list sudo apt-get update sudo apt-get install -y nvidia-docker2 # systemctl daemon-reload