Skip to content

Commit

Permalink
Add nvidia-docker tools installation to worker provisioning (#4438)
Browse files Browse the repository at this point in the history
fix tflint
  • Loading branch information
atalman authored Jul 28, 2023
1 parent d732a93 commit fb7ad95
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ ${install_config_runner}
echo Checking if nvidia install required ${nvidia_driver_install}
%{ if nvidia_driver_install ~}
set +e
os_id=$(awk -F= '/^ID=/{print $2}' /etc/os-release)
os_version=$(awk -F= '/^VERSION=/{print $2}' /etc/os-release)
os_id=$(. /etc/os-release;echo $ID$VERSION_ID)
if ! [[ "$os_id" =~ ^amzn.* ]]; then
echo Installing Development Tools
sudo yum groupinstall -y "Development Tools"
Expand All @@ -38,7 +37,7 @@ sudo rm -fv /tmp/nvidia_driver
if ! [[ "$os_id" =~ ^amzn.* ]]; then
echo Installing nvidia-docker tools
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://nvidia.github.io/nvidia-docker/${os_id}${os_version}/nvidia-docker.repo
sudo yum-config-manager --add-repo https://nvidia.github.io/nvidia-docker/$os_id/nvidia-docker.repo
sudo yum install -y nvidia-docker2
sudo systemctl restart docker
fi
Expand Down

0 comments on commit fb7ad95

Please sign in to comment.