Skip to content

Commit df17ba2

Browse files
committed
1 parent 8721bff commit df17ba2

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/dependencies/hip-openmpi.sh

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,29 @@
77

88
set -eu -o pipefail
99

10+
# `man apt.conf`:
11+
# Number of retries to perform. If this is non-zero APT will retry
12+
# failed files the given number of times.
13+
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
14+
1015
# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu
11-
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key \
12-
| sudo apt-key add -
13-
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' \
14-
| sudo tee /etc/apt/sources.list.d/rocm.list
1516

17+
# Make the directory if it doesn't exist yet.
18+
# This location is recommended by the distribution maintainers.
19+
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
20+
21+
# Download the key, convert the signing-key to a full
22+
# keyring required by apt and store in the keyring directory
23+
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
24+
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
25+
26+
curl -O https://repo.radeon.com/rocm/rocm.gpg.key
27+
sudo apt-key add rocm.gpg.key
28+
29+
source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...
30+
31+
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
32+
| sudo tee /etc/apt/sources.list.d/rocm.list
1633
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
1734
| sudo tee -a /etc/profile.d/rocm.sh
1835
# we should not need to export HIP_PATH=/opt/rocm/hip with those installs

0 commit comments

Comments
 (0)