Skip to content

Commit

Permalink
Use rocm 6.2 in noble image
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Aug 4, 2024
1 parent e9e1435 commit 437a98b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
matrix:
image: ['oldest', 'latest']
backend: ['cpu', 'cuda', 'hip']
exclude:
- image: 'latest' # no ppa yet for hip in noble image
backend: 'hip'
needs: id_repo
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -98,8 +95,6 @@ jobs:
- image: 'oldest' # nvcc 11 only supports C++-17
backend: 'cuda'
cxx_version: '23'
- image: 'latest' # no ppa yet for hip in noble image
backend: 'hip'
- image: 'latest' # nvcc 12 only supports C++-20
backend: 'cuda'
cxx_version: '23'
Expand Down
35 changes: 20 additions & 15 deletions docker/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ FROM ubuntu:noble
LABEL "org.opencontainers.image.source"="https://github.com/Maison-de-la-Simulation/ddc"

ARG BACKEND
ARG AMDGPU_VERSION=6.2
ARG ROCM_VERSION=6.2

COPY bash_run /bin/
ENV BASH_ENV=/etc/profile
SHELL ["/bin/bash", "-c"]

ENV PATH="${PATH:+$PATH:}/opt/rocm-${ROCM_VERSION}.0/bin"

RUN chmod +x /bin/bash_run \
&& export DEBIAN_FRONTEND=noninteractive \
Expand All @@ -26,12 +29,12 @@ RUN chmod +x /bin/bash_run \
gpg \
wget \
&& mkdir --parents --mode=0755 /etc/apt/keyrings \
# && if [ "xhip" = "x${BACKEND}" ] \
# ; then echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/5.7.3/ubuntu noble main" > /etc/apt/sources.list.d/amdgpu.list \
# && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/5.7.3 noble main" > /etc/apt/sources.list.d/rocm.list \
# && wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor --output /etc/apt/keyrings/rocm.gpg \
# && echo -e "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600" > /etc/apt/preferences.d/rocm-pin-600 \
# ; fi \
&& if [ "xhip" = "x${BACKEND}" ] \
; then echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/${AMDGPU_VERSION}/ubuntu noble main" > /etc/apt/sources.list.d/amdgpu.list \
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${ROCM_VERSION} noble main" > /etc/apt/sources.list.d/rocm.list \
&& wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor --output /etc/apt/keyrings/rocm.gpg \
&& echo -e "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600" > /etc/apt/preferences.d/rocm-pin-600 \
; fi \
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/pdidev-archive-keyring.gpg] https://raw.githubusercontent.com/pdidev/repo/ubuntu noble main" > /etc/apt/sources.list.d/pdi.list \
&& wget -q -O /etc/apt/keyrings/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/ubuntu/pdidev-archive-keyring.gpg \
&& apt-get update -y \
Expand All @@ -57,19 +60,24 @@ RUN chmod +x /bin/bash_run \
nvidia-cuda-toolkit \
gcc-12 \
g++-12 \
# ;; "hip") \
# apt-get install -y --no-install-recommends \
# rocm-hip-sdk \
;; esac \
;; "hip") \
apt-get install -y --no-install-recommends \
rocm-hip-sdk \
&& echo "/opt/rocm/lib" >> /etc/ld.so.conf.d/rocm.conf \
&& echo "/opt/rocm/lib64" >> /etc/ld.so.conf.d/rocm.conf \
&& ldconfig \
;; esac \
&& git clone -b v1.8.0 https://github.com/ginkgo-project/ginkgo.git \
&& cd ginkgo \
&& case "${BACKEND}" in \
"cpu") \
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGINKGO_BUILD_OMP=ON -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \
;; "cuda") \
cmake -S . -B build -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_CUDA_HOST_COMPILER=g++-12 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGINKGO_CUDA_ARCHITECTURES=70 -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \
# ;; "hip") \
# cmake -S . -B build -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_HIP_ARCHITECTURES=gfx90a -DGINKGO_BUILD_HIP=ON -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \
;; "hip") \
export HIP_PATH=`hipconfig --path` \
&& export ROCM_PATH=`hipconfig --rocmpath` \
&& cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_HIP_ARCHITECTURES=gfx90a -DGINKGO_BUILD_HIP=ON -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \
;; esac \
&& cmake --build build \
&& cmake --install build \
Expand All @@ -89,9 +97,6 @@ RUN chmod +x /bin/bash_run \
; then echo 'CUDA_GCC=gcc-12' > /etc/profile.d/ddc-cuda.sh \
; echo 'CUDA_GXX=g++-12' >> /etc/profile.d/ddc-cuda.sh \
; fi
# && if [ "xhip" = "x${BACKEND}" ] \
# ; then echo 'export LD_LIBRARY_PATH="/opt/rocm/lib"' > /etc/profile.d/10-rocm.sh \
# ; fi

USER ci:ci
WORKDIR /data
Expand Down

0 comments on commit 437a98b

Please sign in to comment.