File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
terraform-aws-github-runner/modules/runners-instances/templates Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,18 @@ ${install_config_runner}
2323
2424echo Checking if nvidia install required ${nvidia_driver_install}
2525%{ if nvidia_driver_install ~ }
26- set +e
27- DISTRIBUTION=$( . /etc/os-release; echo $ID$VERSION_ID )
28- if [ " ${DISTRIBUTION} " != ubuntu20.04 ]; then
29- sudo yum groupinstall -y " Development Tools"
30- # ensure our kernel install is the same as our underlying kernel,
31- # groupinstall "Development Tools" has a habit of mismatching kernel headers
32- sudo yum install -y " kernel-devel-uname-r == $( uname -r) "
33- sudo modprobe backlight
34- fi
35- sudo curl -fsL -o /tmp/nvidia_driver " https://s3.amazonaws.com/ossci-linux/nvidia_driver/NVIDIA-Linux-x86_64-535.54.03.run"
36- sudo /bin/bash /tmp/nvidia_driver -s --no-drm
37- sudo rm -fv /tmp/nvidia_driver
38- set -e
26+ set +e
27+ os_id=$( awk -F= ' /^ID/{print $2}' /etc/os-release)
28+ if ! [[ " $os_id " =~ ^ubuntu.* ]]; then
29+ echo Installing Development Tools
30+ sudo yum groupinstall -y " Development Tools"
31+ sudo yum install -y " kernel-devel-uname-r == $( uname -r) "
32+ sudo modprobe backlight
33+ fi
34+ sudo curl -fsL -o /tmp/nvidia_driver " https://s3.amazonaws.com/ossci-linux/nvidia_driver/NVIDIA-Linux-x86_64-535.54.03.run"
35+ sudo /bin/bash /tmp/nvidia_driver -s --no-drm
36+ sudo rm -fv /tmp/nvidia_driver
37+ set -e
3938%{ endif ~ }
4039
4140${post_install}
You can’t perform that action at this time.
0 commit comments