Skip to content

Commit

Permalink
Support for several ROCm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fthaler committed Oct 22, 2024
1 parent dc36e71 commit fc03e94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ jobs:
strategy:
matrix:
base: [base]
version: ["6.2.2"]
steps:
- uses: actions/checkout@v2
- name: Free Disk Space (Ubuntu)
Expand All @@ -159,17 +160,18 @@ jobs:
docker build
--progress=plain
--cache-from $CR_REPOSITORY:${{ matrix.base }}
--cache-from $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2
--cache-from $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }}
--build-arg BUILDKIT_INLINE_CACHE=1
--tag $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2
--tag $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }}
--build-arg REPOSITORY=$CR_REPOSITORY
--build-arg BASE=${{ matrix.base }}
--build-arg ROCM_VERSION=${{ matrix.version }}
hip
- name: Push
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository == 'GridTools/gridtools-docker' }}
run: >
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin &&
docker push $CR_REPOSITORY:${{ matrix.base }}-rocm-6.2 &&
docker push $CR_REPOSITORY:${{ matrix.base }}-rocm-${{ matrix.version }} &&
docker logout ghcr.io
hpx:
Expand Down
16 changes: 10 additions & 6 deletions hip/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ ARG BASE
FROM ${REPOSITORY}:${BASE}
LABEL maintainer="Felix Thaler <thaler@cscs.ch>"

# NOTE: If you change the ROCm version here, also change it in the build.yml to avoid overwriting the old image,
# see https://github.com/GridTools/gridtools-docker/issues/97.
RUN wget https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/noble/amdgpu-install_6.2.60201-1_all.deb && \
ARG ROCM_VERSION
ENV ROCM_VERSION ${ROCM_VERSION}

# NOTE: the newest ROCm release should allow to also install older releases. However, older releases
# might not necessarily be available on the current Ubuntu version. For example, on Ubuntu 24.04,
# ROCm 6.2 is currently the only available release.
RUN wget https://repo.radeon.com/amdgpu-install/6.2.2/ubuntu/noble/amdgpu-install_6.2.60202-1_all.deb && \
apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ./amdgpu-install_6.2.60201-1_all.deb && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ./amdgpu-install_6.2.60202-1_all.deb && \
apt-get update -qq && \
amdgpu-install -y --usecase=rocm,hip --no-dkms && \
amdgpu-install -y --usecase=hiplibsdk --no-dkms --rocmrelease=${ROCM_VERSION} && \
rm -rf /var/lib/apt/lists/*

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

0 comments on commit fc03e94

Please sign in to comment.