Skip to content

Commit c05258e

Browse files
committed
use installer
1 parent c4d9bbf commit c05258e

File tree

2 files changed

+43
-21
lines changed

2 files changed

+43
-21
lines changed

parts/linux/cloud-init/artifacts/cse_config.sh

+2-6
Original file line numberDiff line numberDiff line change
@@ -857,13 +857,9 @@ ensureAMDGPUDrivers() {
857857
ensureAMDGPUDriversUbuntu() {
858858
echo "Installing AMD GPU drivers"
859859

860-
pushd /var/cache/amdgpu-apt
861-
ls -l
862-
sudo dpkg -i *.deb
863-
popd
864-
865-
# delete amdgpu module from blacklist
860+
# for some reason the amdgpu module is in blacklist and won't be loaded without this
866861
sudo sed -i '/blacklist amdgpu/d' /etc/modprobe.d/blacklist-radeon-instinct.conf
862+
sudo ./root/rocm-offline-install.run
867863

868864
REBOOTREQUIRED=true
869865
echo "AMD GPU drivers installed"

vhdbuilder/packer/install-dependencies.sh

+41-15
Original file line numberDiff line numberDiff line change
@@ -634,27 +634,53 @@ downloadAMDGPUDriversUbuntu() {
634634
;;
635635
esac
636636

637-
# Add validation keys for amdgpu repo
638-
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
639-
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
640-
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
641-
sudo chmod 0644 /etc/apt/keyrings/rocm.gpg
642-
643-
# for some reason the module is in blacklist for 22.04 and won't be loaded unless we remove it
644-
# attempt to remove it for other releases as well, just in case
645-
sudo sed -i '/blacklist amdgpu/d' /etc/modprobe.d/blacklist-radeon-instinct.conf
646637
if [ "${UBUNTU_RELEASE}" == "22.04" ]; then
647-
echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.3.3/ubuntu jammy main" \
648-
| sudo tee /etc/apt/sources.list.d/amdgpu.list
638+
wget https://repo.radeon.com/rocm/installer/rocm-linux-install-offline/rocm-rel-6.3.3/ubuntu/22.04/rocm-offline-creator_1.0.7.60303-1~22.04.run -O rocm-offline-creator.run
649639
elif [ "${UBUNTU_RELEASE}" == "24.04" ]; then
650-
echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.3.3/ubuntu noble main" \
651-
| sudo tee /etc/apt/sources.list.d/amdgpu.list
640+
wget https://repo.radeon.com/rocm/installer/rocm-linux-install-offline/rocm-rel-6.3.3/ubuntu/24.04/rocm-offline-creator_1.0.7.60303-1~24.04.run -O rocm-offline-creator.run
641+
bash ./rocm-offline-creator_1.0.7.60303-1~24.04.run config=/etc/amdgpu.config
652642
else
653643
echo "Unexpected Ubuntu Release (${UBUNTU_RELEASE})"
654644
exit 1
655645
fi
656-
sudo apt-get update
657-
sudo apt-get install -y amdgpu-dkms
646+
sudo cat > /etc/amdgpu.config << EOL
647+
# Creator/Build Options
648+
###############################
649+
INSTALL_PACKAGE_TYPE=0
650+
INSTALL_PACKAGE_NAME="rocm-offline-install.run"
651+
INSTALL_PACKAGE_DIR=/root
652+
653+
INSTALL_PACKAGE_REPO=0
654+
655+
DOWNLOAD_PKG_CONFIG_NUM=0
656+
657+
# ROCm Options
658+
###############################
659+
ROCM_USECASES=dkms
660+
ROCM_VERSIONS=6.3.3
661+
662+
# Driver/amdgpu Options
663+
###############################
664+
AMDGPU_INSTALL_DRIVER=yes
665+
AMDGPU_POST_INSTALL_BLACKLIST=no
666+
AMDGPU_POST_INSTALL_START=yes
667+
668+
# Post-Install Options
669+
###############################
670+
AMDGPU_POST_GPU_ACCESS_CURRENT_USER=no
671+
AMDGPU_POST_GPU_ACCESS_ALL_USERS=no
672+
673+
# Extra Package Options
674+
###############################
675+
EXTRA_PACKAGES_ONLY=no
676+
EXTRA_PACKAGES=""
677+
678+
# Post-Install Options
679+
###############################
680+
AMDGPU_POST_GPU_ACCESS_CURRENT_USER=no
681+
AMDGPU_POST_GPU_ACCESS_ALL_USERS=no
682+
EOL
683+
sudo bash ./rocm-offline-creator.run config=/etc/amdgpu.config
658684
}
659685

660686
downloadAMDGPUDrivers() {

0 commit comments

Comments
 (0)