Skip to content

Commit ccbff96

Browse files
authored
Update hip installation script for CI (#119)
1 parent f3be58b commit ccbff96

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/dependencies/dependencies_hip.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,32 @@
1212

1313
set -eu -o pipefail
1414

15-
# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu
16-
wget -q -O - http://repo.radeon.com/rocm/rocm.gpg.key \
17-
| sudo apt-key add -
18-
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ ubuntu main' \
19-
| sudo tee /etc/apt/sources.list.d/rocm.list
15+
# `man apt.conf`:
16+
# Number of retries to perform. If this is non-zero APT will retry
17+
# failed files the given number of times.
18+
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
19+
20+
# Ref.: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/native-install/ubuntu.html
21+
22+
# Make the directory if it doesn't exist yet.
23+
# This location is recommended by the distribution maintainers.
24+
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
25+
26+
# Download the key, convert the signing-key to a full
27+
# keyring required by apt and store in the keyring directory
28+
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
29+
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
2030

31+
curl -O https://repo.radeon.com/rocm/rocm.gpg.key
32+
sudo apt-key add rocm.gpg.key
33+
34+
source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...
35+
36+
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
37+
| sudo tee /etc/apt/sources.list.d/rocm.list
2138
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
2239
| sudo tee -a /etc/profile.d/rocm.sh
40+
2341
# we should not need to export HIP_PATH=/opt/rocm/hip with those installs
2442

2543
sudo apt-get update

0 commit comments

Comments
 (0)