File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
terraform-aws-github-runner/modules/runners-instances/templates Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ ${install_config_runner}
2424echo Checking if nvidia install required ${nvidia_driver_install}
2525%{ if nvidia_driver_install ~ }
2626set +e
27- os_id=$( awk -F= ' /^ID=/{print $2}' /etc/os-release)
28- os_version=$( awk -F= ' /^VERSION=/{print $2}' /etc/os-release)
27+ os_id=$( . /etc/os-release; echo $ID$VERSION_ID )
2928if ! [[ " $os_id " =~ ^amzn.* ]]; then
3029 echo Installing Development Tools
3130 sudo yum groupinstall -y " Development Tools"
@@ -38,7 +37,7 @@ sudo rm -fv /tmp/nvidia_driver
3837if ! [[ " $os_id " =~ ^amzn.* ]]; then
3938 echo Installing nvidia-docker tools
4039 sudo yum install -y yum-utils
41- sudo yum-config-manager --add-repo https://nvidia.github.io/nvidia-docker/${ os_id}${os_version} /nvidia-docker.repo
40+ sudo yum-config-manager --add-repo https://nvidia.github.io/nvidia-docker/$os_id /nvidia-docker.repo
4241 sudo yum install -y nvidia-docker2
4342 sudo systemctl restart docker
4443fi
You can’t perform that action at this time.
0 commit comments