diff --git a/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh b/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh index 32c5ae9918..c305a53c52 100644 --- a/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh +++ b/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh @@ -76,7 +76,15 @@ USER_NAME=ec2-user ${install_config_runner} retry sudo $PKG_MANAGER groupinstall -y 'Development Tools' -retry sudo $PKG_MANAGER install -y "kernel-devel-uname-r == $(uname -r)" +retry sudo $PKG_MANAGER install -y "kernel-devel == $(uname -r)" || true + +# Needed since kernel 4.14.336-257.562 is not currently available in package managers +( + pushd /usr/src/kernels/ + aws s3 cp s3://ossci-linux/4.14.336-257.562.amzn2.x86_64.tar.gz . + tar xvzf 4.14.336-257.562.amzn2.x86_64.tar.gz +) + echo Checking if nvidia install required ${nvidia_driver_install} %{ if nvidia_driver_install ~}