Skip to content

Commit

Permalink
al2gpu: Remove epel repo after installing dkms and nvidia open modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Jan 23, 2024
1 parent 5cdf491 commit da10872
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/enable-ecs-agent-gpu-support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ sudo mv $tmpfile /etc/yum.repos.d/amzn2-nvidia-tmp.repo

# only install open driver for post-kepler gpus, exclude airgapped regions
if [[ $AMI_TYPE != "al2keplergpu" && -z ${AIR_GAPPED} ]]; then
sudo yum install -y yum-plugin-versionlock \
yum-utils
sudo yum install -y yum-plugin-versionlock yum-utils
sudo amazon-linux-extras install epel -y
sudo yum install -y "kernel-devel-uname-r == $(uname -r)"

Expand Down Expand Up @@ -60,6 +59,12 @@ if [[ $AMI_TYPE != "al2keplergpu" && -z ${AIR_GAPPED} ]]; then
sudo yum remove -y kmod-nvidia-open-dkms
sudo yum-config-manager --disable cuda-rhel7.repo
sudo rm /etc/yum.repos.d/cuda-rhel7.repo
# epel was used to install dkms, now delete as it points to public http endpoints which
# can cause problems for customers using isolated subnets.
sudo yum-config-manager --disable epel
sudo rm /etc/yum.repos.d/epel.repo
sudo rm /etc/yum.repos.d/epel-testing.repo
sudo amazon-linux-extras disable epel
sudo rm -rf /var/cache/yum
sudo yum-config-manager --enable amzn2-nvidia

Expand Down

0 comments on commit da10872

Please sign in to comment.