Skip to content

Commit

Permalink
[U22_G12_C15_CU122] Initial commit
Browse files Browse the repository at this point in the history
- Add curl pkg
- Add symlink gcov
- Add MPICH
- Remove Paraview
- Update Action
  • Loading branch information
AlexlHer committed Aug 8, 2023
1 parent 8b1770b commit 886c0aa
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 47 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/image_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ env:
REGISTRY: 'ghcr.io'
USER_NAME: 'arcaneframework'
IMAGE_OS_NAME: 'ubuntu-2204'
IMAGE_OS_TAG: 'gcc-12_clang-14_cuda-120'
IMAGE_OS_TAG: 'gcc-12_clang-15_cuda-122'
DOCKERFILE_PATH: './dockerfiles'

jobs:
# On met les if à chaque bloc pour que si l'on veux que full, ce job soit success quand même.
# Quand on demande minimal et full, le minimal doit être fait avant le full.
build-and-push-minimal:
name: U22_G12_C14_CU120 Minimal Image
name: U22_G12_C15_CU122 Minimal Image
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -55,21 +55,21 @@ jobs:
org.opencontainers.image.vendor=CEA
tags: |
type=raw, cuda_minimal_latest
type=raw, cuda-120_minimal_latest
type=raw, cuda-122_minimal_latest
type=raw, ${{ env.IMAGE_OS_TAG }}_minimal_latest
type=raw, ${{ env.IMAGE_OS_TAG }}_minimal_{{date 'YYYYMMDD'}}
- name: Build and push Docker image
if: ${{ inputs.minimal_version }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
file: ${{ env.DOCKERFILE_PATH }}/minimal/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-full:
name: U22_G12_C14_CU120 Full Image
name: U22_G12_C15_CU122 Full Image
if: ${{ inputs.full_version }}
needs:
- build-and-push-minimal
Expand Down Expand Up @@ -100,12 +100,12 @@ jobs:
org.opencontainers.image.vendor=CEA
tags: |
type=raw, cuda_full_latest
type=raw, cuda-120_full_latest
type=raw, cuda-122_full_latest
type=raw, ${{ env.IMAGE_OS_TAG }}_full_latest
type=raw, ${{ env.IMAGE_OS_TAG }}_full_{{date 'YYYYMMDD'}}
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
file: ${{ env.DOCKERFILE_PATH }}/full/Dockerfile
push: true
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# README
## ubuntu-2204:gcc-12_clang-14_cuda-120
## ubuntu-2204:gcc-12_clang-15_cuda-122

This branch contains the workflow and dockerfiles to create an
image with Ubuntu 22.04 and:
- GCC 12
- CLang 14
- CUDA 12.0
- CLang 15
- CUDA 12.2

Two available versions:
- **minimal** : with the minimal set of packages to compile and
Expand Down
50 changes: 22 additions & 28 deletions dockerfiles/full/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
# Ubuntu 22.04 full dependencies for Arcane.
# Version with GCC 12 / CLang 14 / CUDA 12.0.
# Version with GCC 12 / CLang 15 / CUDA 12.2.

FROM ghcr.io/arcaneframework/ubuntu-2204:gcc-12_clang-14_cuda-120_minimal_latest
FROM ghcr.io/arcaneframework/ubuntu-2204:gcc-12_clang-15_cuda-122_minimal_latest

ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=Europe/Paris

# On installe les packages pour compiler Arcane.
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
googletest libgtest-dev \
swig4.0 \
libhypre-dev \
libpetsc-real-dev \
libtrilinos-teuchos-dev libtrilinos-epetra-dev \
libtrilinos-tpetra-dev libtrilinos-kokkos-dev libtrilinos-ifpack2-dev \
libtrilinos-ifpack-dev libtrilinos-amesos-dev libtrilinos-galeri-dev \
libtrilinos-xpetra-dev libtrilinos-epetraext-dev \
libtrilinos-triutils-dev libtrilinos-thyra-dev \
libtrilinos-kokkos-kernels-dev libtrilinos-rtop-dev \
libtrilinos-isorropia-dev libtrilinos-belos-dev \
libtrilinos-ifpack-dev libtrilinos-anasazi-dev \
libtrilinos-amesos2-dev libtrilinos-shards-dev libtrilinos-muelu-dev \
libtrilinos-intrepid2-dev libtrilinos-teko-dev libtrilinos-sacado-dev \
libtrilinos-stratimikos-dev libtrilinos-shylu-dev \
libtrilinos-zoltan-dev libtrilinos-zoltan2-dev \
libtrilinos-aztecoo-dev libtrilinos-ml-dev \
dpkg-dev \
python3-dev python3-numpy \
swig4.0 \
valgrind \
petsc-dev \
trilinos-all-dev \
pd-bsaylor \
libgtest-dev \
libhypre-dev \
libosmesa6-dev \
libunwind-dev \
libptscotch-dev \
libexpat1-dev \
libudunits2-dev \
libmkl-full-dev \
libbz2-dev \
liblz4-dev \
libhypre-dev \
libpapi-dev \
libglvnd-dev \
libgl1-mesa-dev libxt-dev \
libqt5opengl5-dev libqt5x11extras5-dev libqt5help5 qttools5-dev qtxmlpatterns5-dev-tools libqt5svg5-dev \
libarchive-dev \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -47,23 +54,10 @@ RUN cd /tmp \

# On installe OTF2.
RUN cd /tmp \
&& wget https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-3.0.2/otf2-3.0.2.tar.gz \
&& tar zxf otf2-3.0.2.tar.gz \
&& cd otf2-3.0.2/ \
&& wget https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-3.0.3/otf2-3.0.3.tar.gz \
&& tar zxf otf2-3.0.3.tar.gz \
&& cd otf2-3.0.3/ \
&& ./configure --prefix=/usr/local --exec-prefix=/usr/local \
&& make \
&& make install \
&& cd / && rm -rf /tmp/*

# On installe Paraview.
RUN cd /tmp \
&& git clone https://gitlab.kitware.com/paraview/paraview.git \
&& cd paraview \
&& git checkout release \
&& git submodule update --init --recursive \
&& mkdir build \
&& cd build \
&& cmake .. -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release -GNinja \
&& cmake --build . --target install \
&& cd / && rm -rf /tmp/*

73 changes: 64 additions & 9 deletions dockerfiles/minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ubuntu 22.04 minimal dependencies for Arcane.
# Version with GCC 12 / CLang 14 / CUDA 12.0.
# Version with GCC 12 / CLang 15 / CUDA 12.2.

FROM nvidia/cuda:12.0.0-devel-ubuntu22.04
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=Europe/Paris
Expand All @@ -11,12 +11,14 @@ RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
apt-utils \
wget \
curl \
rsync \
build-essential \
gcc-12 \
g++-12 \
clang-14 \
clang-15 \
make \
cmake \
ccache \
ninja-build \
iputils-ping \
Expand All @@ -28,21 +30,74 @@ RUN apt-get update -y \
libboost-program-options-dev \
libopenblas-dev \
libxml2-dev \
libhdf5-dev \
libhdf5-openmpi-dev \
libparmetis-dev \
libhdf5-mpich-dev \
libopenmpi-dev \
libmpich-dev \
libmetis-dev \
libtbb2-dev \
ca-certificates \
dotnet6 \
cmake \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
&& update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-12 100 \
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 100 \
\
&& update-alternatives --set g++ /usr/bin/g++-12 \
&& update-alternatives --set gcc /usr/bin/gcc-12 \
&& update-alternatives --set cpp-bin /usr/bin/cpp-12 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 90 \
&& update-alternatives --set clang /usr/bin/clang-14 \
&& update-alternatives --set clang++ /usr/bin/clang++-14
&& update-alternatives --set gcov /usr/bin/gcov-12 \
\
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100 \
\
&& update-alternatives --set clang /usr/bin/clang-15 \
&& update-alternatives --set clang++ /usr/bin/clang++-15

# On compile et installe deux versions de ParMETIS :
# - une version compilée avec OpenMPI,
# - une version compilée avec MPICH.
# La version OpenMPI est installé dans le répertoire
# "/usr/local/parmetis_openmpi" et la version MPICH est
# installé dans le répértoire "/usr/local/parmetis_mpich".
RUN cd /tmp \
&& wget https://ftp.mcs.anl.gov/pub/pdetools/spack-pkgs/parmetis-4.0.3.tar.gz \
&& tar -zxf parmetis-4.0.3.tar.gz \
&& cd parmetis-4.0.3 \
\
&& update-alternatives --set mpirun /usr/bin/mpirun.mpich \
&& update-alternatives --set mpi /usr/bin/mpicc.mpich \
&& update-alternatives --set mpi-x86_64-linux-gnu /usr/include/x86_64-linux-gnu/mpich \
\
&& make config prefix=/usr/local/parmetis_mpich \
&& make install \
&& make clean \
&& make config shared=1 prefix=/usr/local/parmetis_mpich \
&& make install \
&& make distclean \
\
&& update-alternatives --set mpirun /usr/bin/mpirun.openmpi \
&& update-alternatives --set mpi /usr/bin/mpicc.openmpi \
&& update-alternatives --set h5pcc /usr/bin/h5pcc.openmpi \
&& update-alternatives --set hdf5.pc /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-openmpi.pc \
&& update-alternatives --set mpi-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/openmpi/include \
\
&& make config prefix=/usr/local/parmetis_openmpi \
&& make install \
&& make clean \
&& make config shared=1 prefix=/usr/local/parmetis_openmpi \
&& make install \
&& make distclean \
\
&& update-alternatives --install /usr/include/parmetis.h parmetis /usr/local/parmetis_openmpi/include/parmetis.h 50 \
--slave /usr/lib/x86_64-linux-gnu/libparmetis.a libparmetisa /usr/local/parmetis_openmpi/lib/libparmetis.a \
--slave /usr/lib/x86_64-linux-gnu/libparmetis.so libparmetisso /usr/local/parmetis_openmpi/lib/libparmetis.so \
\
&& update-alternatives --install /usr/include/parmetis.h parmetis /usr/local/parmetis_mpich/include/parmetis.h 40 \
--slave /usr/lib/x86_64-linux-gnu/libparmetis.a libparmetisa /usr/local/parmetis_mpich/lib/libparmetis.a \
--slave /usr/lib/x86_64-linux-gnu/libparmetis.so libparmetisso /usr/local/parmetis_mpich/lib/libparmetis.so \
\
&& update-alternatives --set parmetis /usr/local/parmetis_openmpi/include/parmetis.h \
&& rm -rf /tmp/*

0 comments on commit 886c0aa

Please sign in to comment.