Skip to content

Commit

Permalink
Use packages for repo configuration instead of writing it manually (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
a-crate authored Nov 20, 2024
1 parent 3de04c1 commit 74cf495
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,33 +184,10 @@ dnf install -y google-compute-engine google-osconfig-agent gce-disk-expand
dnf install -y google-cloud-cli

# Install Accelerator components: nvidia and mellanox drivers
tee -a /etc/yum.repos.d/Rocky-OpenGPU.repo << EOM
[open-gpu-kernel-modules-el8-x86_64]
name = Open gpu kernel modules (x86_64)
baseurl = https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el8-x86_64
metadata_expire = 5
priority = 50
repo_gpgcheck = false
gpgcheck = false
enabled = true
skip_if_unavailable = true
EOM
tee -a /etc/yum.repos.d/Rocky-Mlx.repo << EOM
[nvidia-mellanox-ofed-driver-el8-x86_64]
name = Nvidia Mellanox OFED Drivers
baseurl = https://depot.ciq.com/public/files/gce-accelerator/nvidia-mellanox-ofed-driver-el8-x86_64
metadata_expire = 5
priority = 50
repo_gpgcheck = false
gpgcheck = false
enabled = true
skip_if_unavailable = true
EOM

dnf install -y https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el8-x86_64/nvidia-open-gpu-repos.noarch.rpm https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el8-x86_64/nvidia-mellanox-ofed-repos.noarch.rpm
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
dnf install -y nvidia-open-gpu-kernel-modules
dnf install -y nvidia-accelerated-graphics-driver
dnf install -y mlnx-ofed-guest

dnf install -y nvidia-open-gpu-kernel-modules nvidia-accelerated-graphics-driver mlnx-ofed-guest

# Send /root/anaconda-ks.cfg to our logs.
cp /run/install/ks.cfg /tmp/anaconda-ks.cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,33 +183,11 @@ rpm -q google-compute-engine google-osconfig-agent gce-disk-expand || { echo "Bu
dnf install -y google-cloud-cli

# Install Accelerator components: nvidia and mellanox drivers
tee -a /etc/yum.repos.d/Rocky-OpenGPU.repo << EOM
[open-gpu-kernel-modules-el9-x86_64]
name = Open gpu kernel modules (x86_64)
baseurl = https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el9-x86_64
metadata_expire = 5
priority = 50
repo_gpgcheck = false
gpgcheck = false
enabled = true
skip_if_unavailable = true
EOM
tee -a /etc/yum.repos.d/Rocky-Mlx.repo << EOM
[nvidia-mellanox-ofed-driver-el9-x86_64]
name = Nvidia Mellanox OFED Drivers
baseurl = https://depot.ciq.com/public/files/gce-accelerator/nvidia-mellanox-ofed-driver-el9-x86_64
metadata_expire = 5
priority = 50
repo_gpgcheck = false
gpgcheck = false
enabled = true
skip_if_unavailable = true
EOM

dnf install -y https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el9-x86_64/nvidia-open-gpu-repos.noarch.rpm https://depot.ciq.com/public/files/gce-accelerator/open-gpu-kernel-modules-el9-x86_64/nvidia-mellanox-ofed-repos.noarch.rpm
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo
dnf install -y nvidia-open-gpu-kernel-modules
dnf install -y nvidia-accelerated-graphics-driver
dnf install -y mlnx-ofed-guest

dnf install -y nvidia-open-gpu-kernel-modules nvidia-accelerated-graphics-driver mlnx-ofed-guest


# Send /root/anaconda-ks.cfg to our logs.
cp /run/install/ks.cfg /tmp/anaconda-ks.cfg
Expand Down

0 comments on commit 74cf495

Please sign in to comment.