Skip to content

Commit fc03e94

Browse files
committed
Support for several ROCm versions
1 parent dc36e71 commit fc03e94

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jobs:
146146
strategy:
147147
matrix:
148148
base: [base]
149+
version: ["6.2.2"]
149150
steps:
150151
- uses: actions/checkout@v2
151152
- name: Free Disk Space (Ubuntu)
@@ -159,17 +160,18 @@ jobs:
159160
docker build
160161
--progress=plain
161162
--cache-from $CR_REPOSITORY:${{ matrix.base }}
162-
--cache-from $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2
163+
--cache-from $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }}
163164
--build-arg BUILDKIT_INLINE_CACHE=1
164-
--tag $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2
165+
--tag $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }}
165166
--build-arg REPOSITORY=$CR_REPOSITORY
166167
--build-arg BASE=${{ matrix.base }}
168+
--build-arg ROCM_VERSION=${{ matrix.version }}
167169
hip
168170
- name: Push
169171
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository == 'GridTools/gridtools-docker' }}
170172
run: >
171173
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin &&
172-
docker push $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2 &&
174+
docker push $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }} &&
173175
docker logout ghcr.io
174176
175177
hpx:

hip/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ ARG BASE
33
FROM ${REPOSITORY}:${BASE}
44
LABEL maintainer="Felix Thaler <[email protected]>"
55

6-
# NOTE: If you change the ROCm version here, also change it in the build.yml to avoid overwriting the old image,
7-
# see https://github.com/GridTools/gridtools-docker/issues/97.
8-
RUN wget https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/noble/amdgpu-install_6.2.60201-1_all.deb && \
6+
ARG ROCM_VERSION
7+
ENV ROCM_VERSION ${ROCM_VERSION}
8+
9+
# NOTE: the newest ROCm release should allow to also install older releases. However, older releases
10+
# might not necessarily be available on the current Ubuntu version. For example, on Ubuntu 24.04,
11+
# ROCm 6.2 is currently the only available release.
12+
RUN wget https://repo.radeon.com/amdgpu-install/6.2.2/ubuntu/noble/amdgpu-install_6.2.60202-1_all.deb && \
913
apt-get update -qq && \
10-
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ./amdgpu-install_6.2.60201-1_all.deb && \
14+
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ./amdgpu-install_6.2.60202-1_all.deb && \
1115
apt-get update -qq && \
12-
amdgpu-install -y --usecase=rocm,hip --no-dkms && \
16+
amdgpu-install -y --usecase=hiplibsdk --no-dkms --rocmrelease=${ROCM_VERSION} && \
1317
rm -rf /var/lib/apt/lists/*
1418

15-
ENV ROCM_PATH=/opt/rocm
19+
ENV ROCM_PATH=/opt/rocm-${ROCM_VERSION}
1620
ENV PATH=${ROCM_PATH}/bin:${PATH} CXX=${ROCM_PATH}/bin/hipcc

0 commit comments

Comments
 (0)