Skip to content

Commit e853fb3

Browse files
committed
Use AMD's container
1 parent b6554f1 commit e853fb3

1 file changed

Lines changed: 4 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ jobs:
487487
488488
ubuntu-latest-rocm:
489489
runs-on: ubuntu-latest
490+
container: rocm/dev-ubuntu-24.04:7.2
490491

491492
env:
492493
ROCM_VERSION: "7.2"
@@ -512,45 +513,15 @@ jobs:
512513
sudo rm -rf /var/lib/apt/lists/* || true
513514
sudo apt clean
514515
515-
- name: Setup ROCm Repository
516-
run: |
517-
# Always setup ROCm repository (needed even when cache hits)
518-
sudo apt update
519-
sudo apt install -y wget gnupg2
520-
521-
# Add ROCm repository using modern GPG key handling
522-
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-archive-keyring.gpg
523-
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }}/ noble main" | sudo tee /etc/apt/sources.list.d/rocm.list
524-
525-
# Set ROCm repository to highest priority to avoid conflicts with Ubuntu packages
526-
echo "Package: *" | sudo tee /etc/apt/preferences.d/rocm-pin
527-
echo "Pin: origin repo.radeon.com" | sudo tee -a /etc/apt/preferences.d/rocm-pin
528-
echo "Pin-Priority: 1001" | sudo tee -a /etc/apt/preferences.d/rocm-pin
529-
530-
sudo apt update
531-
532-
- name: Install ROCm
516+
- name: Dependencies
517+
id: depends
533518
run: |
534-
# Check if ROCm packages are available
535-
echo "Checking ROCm package availability..."
536-
apt-cache show rocm-dev hip-dev hipblas-dev || {
537-
echo "ROCm packages not found, listing available packages:"
538-
apt-cache search rocm | head -10
539-
apt-cache search hip | head -10
540-
}
541-
542-
# Check repository priorities
543-
echo "Checking repository priorities..."
544-
apt-cache policy hipcc rocm-cmake rocm-utils
545-
546-
# Install ROCm packages (APT preferences will ensure ROCm repo versions are used)
547-
echo "Installing ROCm packages..."
519+
sudo apt-get update
548520
sudo apt install -y \
549521
rocm-dev \
550522
hip-dev \
551523
hipblas-dev \
552524
ninja-build
553-
554525
# Clean apt caches to recover disk space
555526
sudo apt clean
556527
sudo rm -rf /var/lib/apt/lists/* || true

0 commit comments

Comments
 (0)