Skip to content

Commit

Permalink
Update cmake and PDI and add kokkos, kokkos-kernels and kokkos-tools …
Browse files Browse the repository at this point in the history
…in the docker image

- Update PDI to v1.8 from github (previously in gitlab)
- Update cmake to v3.27
- Install Ginkgo on Release, to minimize the image size
- Install Kokkos, Kokkos-fft, Kokkos Kernels and Kokkos Tools:
  - Serial backend in `/opt/serial`
  - OpenMP backend (Serial disabled) in `/opt/openmp`

See merge request gysela-developpers/gyselalibxx!804

--------------------------------------------
  • Loading branch information
tpadioleau committed Dec 17, 2024
1 parent 50d7fdb commit 3a9f9a6
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions docker/gyselalibxx_env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM ubuntu:jammy

COPY bash_run /bin/
ENV BASH_ENV=/etc/profile
ENV PATH=/opt/cmake-3.27/bin:${PATH:+:${PATH}}
SHELL ["/bin/bash", "-c"]


Expand All @@ -18,17 +19,15 @@ RUN chmod +x /bin/bash_run \
apt-utils \
ca-certificates \
wget \
&& echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu jammy main" > /etc/apt/sources.list.d/pdi.list \
&& wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu/pdidev-archive-keyring.gpg \
&& echo "deb [ arch=amd64 ] https://repo.pdi.dev/ubuntu jammy main" > /etc/apt/sources.list.d/pdi.list \
&& wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://repo.pdi.dev/ubuntu/pdidev-archive-keyring.gpg \
&& chmod a+r /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
clang-format \
cmake \
doxygen \
pkg-config \
cmake-data \
git \
libfftw3-dev \
liblapacke-dev \
Expand All @@ -41,13 +40,60 @@ RUN chmod +x /bin/bash_run \
pdiplugin-set-value \
python3-pip \
libpdi-dev \
&& wget https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz \
&& tar --extract --file cmake-3.27.9-linux-x86_64.tar.gz \
&& mv cmake-3.27.9-linux-x86_64 /opt/cmake-3.27 \
&& git clone -b v1.8.0 https://github.com/ginkgo-project/ginkgo.git \
&& cd ginkgo \
&& cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \
&& cmake -DCMAKE_BUILD_TYPE=Release -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -B build \
&& cmake --build build \
&& cmake --install build \
&& cd .. \
&& rm -rf ginkgo \
&& git clone --branch 4.4.01 --depth 1 https://github.com/kokkos/kokkos.git \
&& git clone --branch develop-spline-kernels-v2 --depth 1 https://github.com/yasahi-hpc/kokkos-kernels \
&& git clone --branch develop --depth 1 https://github.com/kokkos/kokkos-tools.git \
&& git clone --branch v0.2.1 --depth 1 https://github.com/kokkos/kokkos-fft.git \
&& export Kokkos_ROOT=/opt/serial/kokkos \
&& export KokkosFFT_ROOT=/opt/serial/kokkos-fft \
&& export KokkosKernels_ROOT=/opt/serial/kokkos-kernels \
&& export KokkosTools_ROOT=/opt/serial/kokkos-tools \
&& cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_DEPRECATED_CODE_4=OFF -DKokkos_ENABLE_SERIAL=ON -B build -S kokkos \
&& cmake --build build \
&& cmake --install build --prefix $Kokkos_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-fft \
&& cmake --build build \
&& cmake --install build --prefix $KokkosFFT_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-kernels \
&& cmake --build build \
&& cmake --install build --prefix $KokkosKernels_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-tools \
&& cmake --build build \
&& cmake --install build --prefix $KokkosTools_ROOT \
&& rm -rf build \
&& export Kokkos_ROOT=/opt/openmp/kokkos \
&& export KokkosFFT_ROOT=/opt/openmp/kokkos-fft \
&& export KokkosKernels_ROOT=/opt/openmp/kokkos-kernels \
&& export KokkosTools_ROOT=/opt/openmp/kokkos-tools \
&& cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_DEPRECATED_CODE_4=OFF -DKokkos_ENABLE_OPENMP=ON -B build -S kokkos \
&& cmake --build build \
&& cmake --install build --prefix $Kokkos_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-fft \
&& cmake --build build \
&& cmake --install build --prefix $KokkosFFT_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-kernels \
&& cmake --build build \
&& cmake --install build --prefix $KokkosKernels_ROOT \
&& rm -rf build \
&& cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-tools \
&& cmake --build build \
&& cmake --install build --prefix $KokkosTools_ROOT \
&& rm -rf build kokkos kokkos-fft kokkos-kernels kokkos-tools \
&& git clone -b 2.14.2 https://github.com/danmar/cppcheck.git \
&& cd cppcheck \
&& cmake -S . -B build \
Expand Down

0 comments on commit 3a9f9a6

Please sign in to comment.