From 8282421ea1acf9485ad4b34e2392449e130cea5f Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Wed, 20 May 2026 17:07:25 +0200 Subject: [PATCH 1/8] Edited dokerfile --- Dockerfile | 159 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 98 insertions(+), 61 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b50174..4ebbb4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,52 +1,74 @@ -FROM ghcr.io/seisscoped/container-base +# ========================================== +# STAGE 0: Build Environment (Native GCC 13) +# ========================================== +FROM ubuntu:24.04 AS builder -RUN apt-get update \ - && apt-get install -y \ +# Prevent interactive prompts during apt installations +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ + ca-certificates \ cmake \ g++ \ gcc \ gfortran \ - libgomp1 \ + git \ + make \ libnuma-dev \ - libnuma1 \ - libocct-data-exchange-7.5 \ - libocct-data-exchange-dev \ - libocct-foundation-7.5 \ - libocct-foundation-dev \ - libocct-modeling-algorithms-7.5 \ - libocct-modeling-algorithms-dev \ - libocct-modeling-data-7.5 \ - libocct-modeling-data-dev \ - libopenblas-base \ libopenblas-dev \ + libopenmpi-dev \ libreadline-dev \ - libtbb2 \ + libtbb-dev \ libyaml-cpp-dev \ + libxml2-dev \ + openmpi-bin \ pkg-config \ - zlib1g \ + python3 \ + python3-pip \ + python3-setuptools \ + wget \ zlib1g-dev \ - && docker-clean + && rm -rf /var/lib/apt/lists/* -RUN mkdir -p /home/tools +# Cleanly initialize custom build workspace directories +RUN mkdir -p /home/tools/bin /home/tools/lib /home/tools/include WORKDIR /tmp -ENV PATH="/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/bin:/home/tools/bin:${PATH}" \ - LD_LIBRARY_PATH="/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/libfabric/lib:/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/release:/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib" - -RUN wget --progress=bar:force:noscroll https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.bz2 \ - && tar -xvf hdf5-1.12.2.tar.bz2 \ - && cd hdf5-1.12.2 \ - && CFLAGS="-fPIC" CC=mpicc FC="mpif90 --std=f95" ./configure --enable-parallel --with-zlib --disable-shared --prefix /home/tools \ +# Setup pristine search and linking paths for your custom toolchain +ENV PATH="/home/tools/bin:${PATH:-}" +ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" +ENV PKG_CONFIG_PATH="/home/tools/lib/pkgconfig:${PKG_CONFIG_PATH:-}" +ENV CMAKE_PREFIX_PATH="/home/tools:${CMAKE_PREFIX_PATH:-}" +ENV CPATH="/home/tools/include:${CPATH:-}" + +# 1. Compile HDF5 (Parallel processing enabled over native OpenMPI) +RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.bz2 \ + && tar -xvf hdf5-1.12.3.tar.bz2 \ + && cd hdf5-1.12.3 \ + && CFLAGS="-fPIC -Wno-error=format-security" CPPFLAGS="-fPIC" CC=mpicc CXX=mpicxx ./configure \ + --enable-parallel \ + --prefix=/home/tools \ + --with-zlib \ + --disable-shared \ + --disable-dependency-tracking \ && make -j$(nproc) && make install +# 2. Build libxsmm +RUN git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ + && cd libxsmm \ + && make -j$(nproc) generator \ + && cp bin/libxsmm_gemm_generator /home/tools/bin/ + +# 3. Build NetCDF RUN wget --progress=bar:force:noscroll https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz \ && tar -xvf netcdf-c-4.9.2.tar.gz \ && cd netcdf-c-4.9.2 \ && CFLAGS="-fPIC" CC=h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap --disable-byterange \ && make -j$(nproc) && make install +# 4. Build ParMETIS RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-free/p/parmetis/parmetis_4.0.3.orig.tar.gz \ && tar -xvf parmetis_4.0.3.orig.tar.gz \ && cd parmetis-4.0.3 \ @@ -56,92 +78,100 @@ RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-fr && cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \ && cp metis/include/metis.h /home/tools/include +# 5. Build Lua RUN wget --progress=bar:force:noscroll https://www.lua.org/ftp/lua-5.3.6.tar.gz \ && tar -xzvf lua-5.3.6.tar.gz \ && cd lua-5.3.6 && make linux CC=mpicc && make local \ && cp -r install/* /home/tools && cd .. +# 6. Build Eigen RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \ && tar -xf eigen-3.4.0.tar.gz \ && cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) install +# 7. Build PROJ RUN git clone --depth 1 --single-branch --branch 4.9.3 https://github.com/OSGeo/PROJ.git \ && cd PROJ \ && mkdir build && cd build \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) && make install -RUN git clone --depth 1 --single-branch --branch 1.16.1 https://github.com/hfp/libxsmm.git \ - && cd libxsmm \ - && make -j$(nproc) generator \ - && cp bin/libxsmm_gemm_generator /home/tools/bin - -### Put all dependencies, which point to a specific version, before this comment -### Put all dependencies, which use the latest version, after this comment to reduce build time - +# 8. Build ASAGI RUN git clone --recursive https://github.com/TUM-I5/ASAGI.git \ && cd ASAGI \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ + && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ && make -j$(nproc) && make install +# 9. Build easi RUN git clone https://github.com/SeisSol/easi \ && cd easi \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF .. \ + && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF \ && make -j$(nproc) && make install -RUN pip install numpy && docker-clean +# Install foundational generation packages alongside PSpaMM via pip3 +RUN pip3 install --no-cache-dir --break-system-packages numpy \ + && pip3 install --no-cache-dir --break-system-packages git+https://github.com/SeisSol/PSpaMM.git -RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://github.com/SeisSol/SeisSol.git \ +# 10. Build SeisSol +RUN git clone --recursive https://github.com/SeisSol/SeisSol.git \ && cd SeisSol \ && mkdir build_hsw && cd build_hsw \ - && export PATH=$PATH:/home/tools/bin \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=LIBXSMM -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ - && make -j$(nproc) \ - && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ + &&CC=mpicc CXX=mpicxx cmake .. \ + -DCMAKE_PREFIX_PATH=/home/tools \ + -DCMAKE_LIBRARY_PATH=/home/tools/lib \ + -DCMAKE_INCLUDE_PATH=/home/tools/include \ + -DGEMM_TOOLS_LIST=auto \ + -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=6 -DEQUATIONS=elastic \ && make -j$(nproc) \ && cp SeisSol_* /home/tools/bin -RUN cd SeisSol/preprocessing/science/rconv \ +# 11. Build rconv +RUN cd SeisSol/preprocessing/science/rconv/ \ && mkdir build && cd build \ && echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \ && echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \ && make -j$(nproc) && cp rconv /home/tools/bin/ +# 12. Build PUMGen RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git \ && cd PUMGen \ && mkdir build && cd build \ - && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ + && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ && make -j$(nproc) && make install -FROM ghcr.io/seisscoped/container-base + +# ========================================== +# STAGE 1: Final Lightweight Runtime Image +# ========================================== +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ + ca-certificates \ gmsh \ libgomp1 \ libnuma1 \ - libocct-data-exchange-7.5 \ - libocct-foundation-7.5 \ - libocct-modeling-algorithms-7.5 \ - libocct-modeling-data-7.5 \ - libopenblas-base \ + libopenblas-dev \ libopenmpi3 \ - libtbb2 \ + libtbb12 \ libxrender1 \ - libyaml-cpp-dev \ + libyaml-cpp0.8 \ + openmpi-bin \ + python3 \ + python3-pip \ tini \ xvfb \ zlib1g \ - && docker-clean + && rm -rf /var/lib/apt/lists/* -WORKDIR /home -COPY --from=0 /home/tools tools -### need to specify --user for gmsh installation, otherwise the tpv13 notebook can't execute !gmsh -RUN conda install \ +# Install modern Python plotting and visualization stack natively +RUN pip3 install --no-cache-dir --break-system-packages \ panel \ ipyvtklink \ vtk \ @@ -151,15 +181,22 @@ RUN conda install \ pyproj \ matplotlib \ gmsh \ - python-gmsh \ sympy \ - pandas \ - && docker-clean -ENV PATH=/home/tools/bin:$PATH + pandas + +WORKDIR /home +COPY --from=builder /home/tools tools + +# Expose modern linking environments globally to runtime contexts +ENV PATH="/home/tools/bin:${PATH:-}" +ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" +ENV PYTHONPATH="/home/tools/lib:${PYTHONPATH:-}" + ENV OMP_PLACES="cores" ENV OMP_PROC_BIND="spread" -ENV PYTHONPATH="${PYTHONPATH}:/home/tools/lib" + COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh WORKDIR /home/training COPY tpv13/ tpv13/ From fda1dc0ab3689c569cb980f372bb4f415cef5b7b Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Wed, 20 May 2026 17:25:08 +0200 Subject: [PATCH 2/8] fix rconv builds --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4ebbb4d..bfd924a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,6 +130,7 @@ RUN git clone --recursive https://github.com/SeisSol/SeisSol.git \ # 11. Build rconv RUN cd SeisSol/preprocessing/science/rconv/ \ + && git checkout vikas/rconv-fix \ && mkdir build && cd build \ && echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \ && echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \ From a0cce6182182a0294f09cdb945fe2a19b1d31c3a Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Thu, 21 May 2026 09:42:21 +0200 Subject: [PATCH 3/8] moved modifications --- Dockerfile | 160 +++++++++++++++---------------------- Dockerfile_jupyterlab | 178 ++++++++++++++++++++++++------------------ 2 files changed, 162 insertions(+), 176 deletions(-) diff --git a/Dockerfile b/Dockerfile index bfd924a..3b50174 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,74 +1,52 @@ -# ========================================== -# STAGE 0: Build Environment (Native GCC 13) -# ========================================== -FROM ubuntu:24.04 AS builder +FROM ghcr.io/seisscoped/container-base -# Prevent interactive prompts during apt installations -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get install -y \ bzip2 \ - ca-certificates \ cmake \ g++ \ gcc \ gfortran \ - git \ - make \ + libgomp1 \ libnuma-dev \ + libnuma1 \ + libocct-data-exchange-7.5 \ + libocct-data-exchange-dev \ + libocct-foundation-7.5 \ + libocct-foundation-dev \ + libocct-modeling-algorithms-7.5 \ + libocct-modeling-algorithms-dev \ + libocct-modeling-data-7.5 \ + libocct-modeling-data-dev \ + libopenblas-base \ libopenblas-dev \ - libopenmpi-dev \ libreadline-dev \ - libtbb-dev \ + libtbb2 \ libyaml-cpp-dev \ - libxml2-dev \ - openmpi-bin \ pkg-config \ - python3 \ - python3-pip \ - python3-setuptools \ - wget \ + zlib1g \ zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* + && docker-clean -# Cleanly initialize custom build workspace directories -RUN mkdir -p /home/tools/bin /home/tools/lib /home/tools/include +RUN mkdir -p /home/tools WORKDIR /tmp -# Setup pristine search and linking paths for your custom toolchain -ENV PATH="/home/tools/bin:${PATH:-}" -ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" -ENV PKG_CONFIG_PATH="/home/tools/lib/pkgconfig:${PKG_CONFIG_PATH:-}" -ENV CMAKE_PREFIX_PATH="/home/tools:${CMAKE_PREFIX_PATH:-}" -ENV CPATH="/home/tools/include:${CPATH:-}" - -# 1. Compile HDF5 (Parallel processing enabled over native OpenMPI) -RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.bz2 \ - && tar -xvf hdf5-1.12.3.tar.bz2 \ - && cd hdf5-1.12.3 \ - && CFLAGS="-fPIC -Wno-error=format-security" CPPFLAGS="-fPIC" CC=mpicc CXX=mpicxx ./configure \ - --enable-parallel \ - --prefix=/home/tools \ - --with-zlib \ - --disable-shared \ - --disable-dependency-tracking \ - && make -j$(nproc) && make install +ENV PATH="/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/bin:/home/tools/bin:${PATH}" \ + LD_LIBRARY_PATH="/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/libfabric/lib:/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/release:/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib" -# 2. Build libxsmm -RUN git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ - && cd libxsmm \ - && make -j$(nproc) generator \ - && cp bin/libxsmm_gemm_generator /home/tools/bin/ +RUN wget --progress=bar:force:noscroll https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.bz2 \ + && tar -xvf hdf5-1.12.2.tar.bz2 \ + && cd hdf5-1.12.2 \ + && CFLAGS="-fPIC" CC=mpicc FC="mpif90 --std=f95" ./configure --enable-parallel --with-zlib --disable-shared --prefix /home/tools \ + && make -j$(nproc) && make install -# 3. Build NetCDF RUN wget --progress=bar:force:noscroll https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz \ && tar -xvf netcdf-c-4.9.2.tar.gz \ && cd netcdf-c-4.9.2 \ && CFLAGS="-fPIC" CC=h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap --disable-byterange \ && make -j$(nproc) && make install -# 4. Build ParMETIS RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-free/p/parmetis/parmetis_4.0.3.orig.tar.gz \ && tar -xvf parmetis_4.0.3.orig.tar.gz \ && cd parmetis-4.0.3 \ @@ -78,101 +56,92 @@ RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-fr && cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \ && cp metis/include/metis.h /home/tools/include -# 5. Build Lua RUN wget --progress=bar:force:noscroll https://www.lua.org/ftp/lua-5.3.6.tar.gz \ && tar -xzvf lua-5.3.6.tar.gz \ && cd lua-5.3.6 && make linux CC=mpicc && make local \ && cp -r install/* /home/tools && cd .. -# 6. Build Eigen RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \ && tar -xf eigen-3.4.0.tar.gz \ && cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) install -# 7. Build PROJ RUN git clone --depth 1 --single-branch --branch 4.9.3 https://github.com/OSGeo/PROJ.git \ && cd PROJ \ && mkdir build && cd build \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) && make install -# 8. Build ASAGI +RUN git clone --depth 1 --single-branch --branch 1.16.1 https://github.com/hfp/libxsmm.git \ + && cd libxsmm \ + && make -j$(nproc) generator \ + && cp bin/libxsmm_gemm_generator /home/tools/bin + +### Put all dependencies, which point to a specific version, before this comment +### Put all dependencies, which use the latest version, after this comment to reduce build time + RUN git clone --recursive https://github.com/TUM-I5/ASAGI.git \ && cd ASAGI \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ + && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ && make -j$(nproc) && make install -# 9. Build easi RUN git clone https://github.com/SeisSol/easi \ && cd easi \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF \ + && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF .. \ && make -j$(nproc) && make install -# Install foundational generation packages alongside PSpaMM via pip3 -RUN pip3 install --no-cache-dir --break-system-packages numpy \ - && pip3 install --no-cache-dir --break-system-packages git+https://github.com/SeisSol/PSpaMM.git +RUN pip install numpy && docker-clean -# 10. Build SeisSol -RUN git clone --recursive https://github.com/SeisSol/SeisSol.git \ +RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://github.com/SeisSol/SeisSol.git \ && cd SeisSol \ && mkdir build_hsw && cd build_hsw \ - &&CC=mpicc CXX=mpicxx cmake .. \ - -DCMAKE_PREFIX_PATH=/home/tools \ - -DCMAKE_LIBRARY_PATH=/home/tools/lib \ - -DCMAKE_INCLUDE_PATH=/home/tools/include \ - -DGEMM_TOOLS_LIST=auto \ - -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=6 -DEQUATIONS=elastic \ + && export PATH=$PATH:/home/tools/bin \ + && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=LIBXSMM -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ + && make -j$(nproc) \ + && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ && make -j$(nproc) \ && cp SeisSol_* /home/tools/bin -# 11. Build rconv -RUN cd SeisSol/preprocessing/science/rconv/ \ - && git checkout vikas/rconv-fix \ +RUN cd SeisSol/preprocessing/science/rconv \ && mkdir build && cd build \ && echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \ && echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \ && make -j$(nproc) && cp rconv /home/tools/bin/ -# 12. Build PUMGen RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git \ && cd PUMGen \ && mkdir build && cd build \ - && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ + && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ && make -j$(nproc) && make install - -# ========================================== -# STAGE 1: Final Lightweight Runtime Image -# ========================================== -FROM ubuntu:24.04 - -ENV DEBIAN_FRONTEND=noninteractive +FROM ghcr.io/seisscoped/container-base RUN apt-get update \ && apt-get install -y --no-install-recommends \ - ca-certificates \ gmsh \ libgomp1 \ libnuma1 \ - libopenblas-dev \ + libocct-data-exchange-7.5 \ + libocct-foundation-7.5 \ + libocct-modeling-algorithms-7.5 \ + libocct-modeling-data-7.5 \ + libopenblas-base \ libopenmpi3 \ - libtbb12 \ + libtbb2 \ libxrender1 \ - libyaml-cpp0.8 \ - openmpi-bin \ - python3 \ - python3-pip \ + libyaml-cpp-dev \ tini \ xvfb \ zlib1g \ - && rm -rf /var/lib/apt/lists/* + && docker-clean -# Install modern Python plotting and visualization stack natively -RUN pip3 install --no-cache-dir --break-system-packages \ +WORKDIR /home +COPY --from=0 /home/tools tools +### need to specify --user for gmsh installation, otherwise the tpv13 notebook can't execute !gmsh +RUN conda install \ panel \ ipyvtklink \ vtk \ @@ -182,22 +151,15 @@ RUN pip3 install --no-cache-dir --break-system-packages \ pyproj \ matplotlib \ gmsh \ + python-gmsh \ sympy \ - pandas - -WORKDIR /home -COPY --from=builder /home/tools tools - -# Expose modern linking environments globally to runtime contexts -ENV PATH="/home/tools/bin:${PATH:-}" -ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" -ENV PYTHONPATH="/home/tools/lib:${PYTHONPATH:-}" - + pandas \ + && docker-clean +ENV PATH=/home/tools/bin:$PATH ENV OMP_PLACES="cores" ENV OMP_PROC_BIND="spread" - +ENV PYTHONPATH="${PYTHONPATH}:/home/tools/lib" COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh WORKDIR /home/training COPY tpv13/ tpv13/ diff --git a/Dockerfile_jupyterlab b/Dockerfile_jupyterlab index fa05cfb..bfd924a 100644 --- a/Dockerfile_jupyterlab +++ b/Dockerfile_jupyterlab @@ -1,158 +1,178 @@ -FROM ghcr.io/seisscoped/container-base:ubuntu22.04_jupyterlab +# ========================================== +# STAGE 0: Build Environment (Native GCC 13) +# ========================================== +FROM ubuntu:24.04 AS builder -RUN apt-get update \ - && apt-get install -y \ +# Prevent interactive prompts during apt installations +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ + ca-certificates \ cmake \ g++ \ gcc \ gfortran \ - libgomp1 \ + git \ + make \ libnuma-dev \ - libnuma1 \ - libocct-data-exchange-7.5 \ - libocct-data-exchange-dev \ - libocct-foundation-7.5 \ - libocct-foundation-dev \ - libocct-modeling-algorithms-7.5 \ - libocct-modeling-algorithms-dev \ - libocct-modeling-data-7.5 \ - libocct-modeling-data-dev \ - libopenblas-base \ libopenblas-dev \ + libopenmpi-dev \ libreadline-dev \ - libtbb2 \ + libtbb-dev \ libyaml-cpp-dev \ - libmpich-dev \ - mpich \ - m4 \ + libxml2-dev \ + openmpi-bin \ pkg-config \ - zlib1g \ + python3 \ + python3-pip \ + python3-setuptools \ + wget \ zlib1g-dev \ - && docker-clean + && rm -rf /var/lib/apt/lists/* -RUN mkdir -p /home/tools +# Cleanly initialize custom build workspace directories +RUN mkdir -p /home/tools/bin /home/tools/lib /home/tools/include WORKDIR /tmp -ENV PATH="/home/tools/bin:${PATH}" - -ARG TARGETARCH - -RUN wget --progress=bar:force:noscroll https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.bz2 \ - && tar -xvf hdf5-1.12.2.tar.bz2 \ - && cd hdf5-1.12.2 \ - && CFLAGS="-fPIC" CC=mpicc FC="mpif90 --std=f95" ./configure --enable-parallel --with-zlib --disable-shared --prefix /home/tools \ +# Setup pristine search and linking paths for your custom toolchain +ENV PATH="/home/tools/bin:${PATH:-}" +ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" +ENV PKG_CONFIG_PATH="/home/tools/lib/pkgconfig:${PKG_CONFIG_PATH:-}" +ENV CMAKE_PREFIX_PATH="/home/tools:${CMAKE_PREFIX_PATH:-}" +ENV CPATH="/home/tools/include:${CPATH:-}" + +# 1. Compile HDF5 (Parallel processing enabled over native OpenMPI) +RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.bz2 \ + && tar -xvf hdf5-1.12.3.tar.bz2 \ + && cd hdf5-1.12.3 \ + && CFLAGS="-fPIC -Wno-error=format-security" CPPFLAGS="-fPIC" CC=mpicc CXX=mpicxx ./configure \ + --enable-parallel \ + --prefix=/home/tools \ + --with-zlib \ + --disable-shared \ + --disable-dependency-tracking \ && make -j$(nproc) && make install +# 2. Build libxsmm +RUN git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ + && cd libxsmm \ + && make -j$(nproc) generator \ + && cp bin/libxsmm_gemm_generator /home/tools/bin/ + +# 3. Build NetCDF RUN wget --progress=bar:force:noscroll https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz \ && tar -xvf netcdf-c-4.9.2.tar.gz \ && cd netcdf-c-4.9.2 \ && CFLAGS="-fPIC" CC=h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap --disable-byterange \ && make -j$(nproc) && make install +# 4. Build ParMETIS RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-free/p/parmetis/parmetis_4.0.3.orig.tar.gz \ && tar -xvf parmetis_4.0.3.orig.tar.gz \ && cd parmetis-4.0.3 \ && sed -i 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' ./metis/include/metis.h \ && CC=mpicc CXX=mpicxx make config prefix=/home/tools \ && make -j$(nproc) && make install \ - && if [ "$TARGETARCH" == "arm64" ]; \ - then cp build/Linux-aarch64/libmetis/libmetis.a /home/tools/lib; \ - else cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib; fi \ + && cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \ && cp metis/include/metis.h /home/tools/include +# 5. Build Lua RUN wget --progress=bar:force:noscroll https://www.lua.org/ftp/lua-5.3.6.tar.gz \ && tar -xzvf lua-5.3.6.tar.gz \ && cd lua-5.3.6 && make linux CC=mpicc && make local \ && cp -r install/* /home/tools && cd .. +# 6. Build Eigen RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \ && tar -xf eigen-3.4.0.tar.gz \ && cd eigen-3.4.0 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) install +# 7. Build PROJ RUN git clone --depth 1 --single-branch --branch 4.9.3 https://github.com/OSGeo/PROJ.git \ && cd PROJ \ && mkdir build && cd build \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ && make -j$(nproc) && make install -### Put all dependencies, which point to a specific version, before this comment -### Put all dependencies, which use the latest version, after this comment to reduce build time - +# 8. Build ASAGI RUN git clone --recursive https://github.com/TUM-I5/ASAGI.git \ && cd ASAGI \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ + && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \ && make -j$(nproc) && make install +# 9. Build easi RUN git clone https://github.com/SeisSol/easi \ && cd easi \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF .. \ + && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF \ && make -j$(nproc) && make install -RUN pip install numpy && pip install git+https://github.com/SeisSol/PSpaMM.git && docker-clean +# Install foundational generation packages alongside PSpaMM via pip3 +RUN pip3 install --no-cache-dir --break-system-packages numpy \ + && pip3 install --no-cache-dir --break-system-packages git+https://github.com/SeisSol/PSpaMM.git -#RUN git clone --depth 1 --single-branch --branch main https://github.com/libxsmm/libxsmm.git \ -# && cd libxsmm \ -# && make PLATFORM=1 JIT=1 AR=aarch64-linux-gnu-ar \ -# FC=aarch64-linux-gnu-gfortran \ -# CXX=aarch64-linux-gnu-g++ \ -# CC=aarch64-linux-gnu-gcc \ -# -j$(nproc) generator \ -# && cp bin/libxsmm_gemm_generator /home/tools/bin - -RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://github.com/SeisSol/SeisSol.git \ +# 10. Build SeisSol +RUN git clone --recursive https://github.com/SeisSol/SeisSol.git \ && cd SeisSol \ && mkdir build_hsw && cd build_hsw \ - && export PATH=$PATH:/home/tools/bin \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=PSpaMM -DHOST_ARCH=noarch -DASAGI=on -DNETCDF=on -DORDER=4 \ - && make -j$(nproc) \ - && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ + &&CC=mpicc CXX=mpicxx cmake .. \ + -DCMAKE_PREFIX_PATH=/home/tools \ + -DCMAKE_LIBRARY_PATH=/home/tools/lib \ + -DCMAKE_INCLUDE_PATH=/home/tools/include \ + -DGEMM_TOOLS_LIST=auto \ + -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=6 -DEQUATIONS=elastic \ && make -j$(nproc) \ && cp SeisSol_* /home/tools/bin -RUN cd SeisSol/preprocessing/science/rconv \ +# 11. Build rconv +RUN cd SeisSol/preprocessing/science/rconv/ \ + && git checkout vikas/rconv-fix \ && mkdir build && cd build \ && echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \ && echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \ && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \ && make -j$(nproc) && cp rconv /home/tools/bin/ +# 12. Build PUMGen RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git \ && cd PUMGen \ && mkdir build && cd build \ - && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ + && cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \ && make -j$(nproc) && make install -FROM ghcr.io/seisscoped/container-base:ubuntu22.04_jupyterlab + +# ========================================== +# STAGE 1: Final Lightweight Runtime Image +# ========================================== +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ + ca-certificates \ gmsh \ libgomp1 \ libnuma1 \ - libocct-data-exchange-7.5 \ - libocct-foundation-7.5 \ - libocct-modeling-algorithms-7.5 \ - libocct-modeling-data-7.5 \ - libopenblas-base \ - libtbb2 \ + libopenblas-dev \ + libopenmpi3 \ + libtbb12 \ libxrender1 \ - libyaml-cpp-dev \ - libmpich-dev \ - mpich \ + libyaml-cpp0.8 \ + openmpi-bin \ + python3 \ + python3-pip \ tini \ xvfb \ zlib1g \ - && docker-clean + && rm -rf /var/lib/apt/lists/* -WORKDIR /home -COPY --from=0 /home/tools tools -### need to specify --user for gmsh installation, otherwise the tpv13 notebook can't execute !gmsh -RUN conda install \ +# Install modern Python plotting and visualization stack natively +RUN pip3 install --no-cache-dir --break-system-packages \ panel \ ipyvtklink \ vtk \ @@ -162,18 +182,22 @@ RUN conda install \ pyproj \ matplotlib \ gmsh \ - python-gmsh \ sympy \ - pandas \ - && docker-clean -ENV PATH=/home/tools/bin:$PATH + pandas + +WORKDIR /home +COPY --from=builder /home/tools tools + +# Expose modern linking environments globally to runtime contexts +ENV PATH="/home/tools/bin:${PATH:-}" +ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" +ENV PYTHONPATH="/home/tools/lib:${PYTHONPATH:-}" + ENV OMP_PLACES="cores" ENV OMP_PROC_BIND="spread" -ENV PYTHONPATH="${PYTHONPATH}:/home/tools/lib" + COPY entrypoint.sh /entrypoint.sh -RUN cd /home/tools/bin/ \ - && mv SeisSol_Release_dnoarch_4_elastic SeisSol_Release_dhsw_4_elastic \ - && mv SeisSol_Release_dnoarch_4_viscoelastic2 SeisSol_Release_dhsw_4_viscoelastic2 +RUN chmod +x /entrypoint.sh WORKDIR /home/training COPY tpv13/ tpv13/ From fd44530ba16d4daaed9ba63a3b2ad2e35923e108 Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Thu, 21 May 2026 15:40:59 +0200 Subject: [PATCH 4/8] docker file with arm and x86 --- Dockerfile_jupyterlab | 93 ++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/Dockerfile_jupyterlab b/Dockerfile_jupyterlab index bfd924a..0509b0d 100644 --- a/Dockerfile_jupyterlab +++ b/Dockerfile_jupyterlab @@ -1,11 +1,11 @@ # ========================================== -# STAGE 0: Build Environment (Native GCC 13) +# STAGE 0: Build Environment (Ubuntu 26.04 LTS) # ========================================== -FROM ubuntu:24.04 AS builder +FROM ubuntu:26.04 AS builder -# Prevent interactive prompts during apt installations ENV DEBIAN_FRONTEND=noninteractive +# Installs compilation tools (heavyweight workspace) RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ ca-certificates \ @@ -21,7 +21,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libreadline-dev \ libtbb-dev \ libyaml-cpp-dev \ - libxml2-dev \ openmpi-bin \ pkg-config \ python3 \ @@ -31,19 +30,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* -# Cleanly initialize custom build workspace directories RUN mkdir -p /home/tools/bin /home/tools/lib /home/tools/include WORKDIR /tmp -# Setup pristine search and linking paths for your custom toolchain ENV PATH="/home/tools/bin:${PATH:-}" ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" ENV PKG_CONFIG_PATH="/home/tools/lib/pkgconfig:${PKG_CONFIG_PATH:-}" ENV CMAKE_PREFIX_PATH="/home/tools:${CMAKE_PREFIX_PATH:-}" ENV CPATH="/home/tools/include:${CPATH:-}" -# 1. Compile HDF5 (Parallel processing enabled over native OpenMPI) +# 1. Compile HDF5 RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.bz2 \ && tar -xvf hdf5-1.12.3.tar.bz2 \ && cd hdf5-1.12.3 \ @@ -55,17 +52,27 @@ RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/sr --disable-dependency-tracking \ && make -j$(nproc) && make install -# 2. Build libxsmm -RUN git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ - && cd libxsmm \ - && make -j$(nproc) generator \ - && cp bin/libxsmm_gemm_generator /home/tools/bin/ - +# 2. Build libxsmm (Compiled ONLY on Intel hosts, cleanly skipped on ARM) +ARG TARGETARCH +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ + && cd libxsmm \ + && make -j$(nproc) generator \ + && cp bin/libxsmm_gemm_generator /home/tools/bin/; \ + else \ + echo "Skipping libxsmm compilation: target architecture is ARM64 (Apple Silicon). Matrix acceleration will fall back cleanly to PSPaMM."; \ + fi + # 3. Build NetCDF RUN wget --progress=bar:force:noscroll https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz \ && tar -xvf netcdf-c-4.9.2.tar.gz \ && cd netcdf-c-4.9.2 \ - && CFLAGS="-fPIC" CC=h5pcc ./configure --enable-shared=no --prefix=/home/tools --disable-dap --disable-byterange \ + && CFLAGS="-fPIC" CC=h5pcc ./configure \ + --enable-shared=no \ + --prefix=/home/tools \ + --disable-dap \ + --disable-byterange \ + --disable-libxml2 \ && make -j$(nproc) && make install # 4. Build ParMETIS @@ -73,9 +80,14 @@ RUN wget --progress=bar:force:noscroll https://deb.debian.org/debian/pool/non-fr && tar -xvf parmetis_4.0.3.orig.tar.gz \ && cd parmetis-4.0.3 \ && sed -i 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' ./metis/include/metis.h \ - && CC=mpicc CXX=mpicxx make config prefix=/home/tools \ + # Modernize the obsolete CMake version requirement across all internal trees + && sed -i 's/cmake_minimum_required(VERSION 2.8)/cmake_minimum_required(VERSION 3.5)/g' CMakeLists.txt \ + && sed -i 's/cmake_minimum_required(VERSION 2.8)/cmake_minimum_required(VERSION 3.5)/g' metis/CMakeLists.txt \ + # Force the policy bypass engine into the configuration line + && CC=mpicc CXX=mpicxx make config prefix=/home/tools flags="-DCMAKE_POLICY_VERSION_MINIMUM=3.5" \ && make -j$(nproc) && make install \ - && cp build/Linux-x86_64/libmetis/libmetis.a /home/tools/lib \ + # Use architecture-independent wildcards to handle both x86_64 and aarch64 output trees cleanly + && cp build/Linux-*/libmetis/libmetis.a /home/tools/lib \ && cp metis/include/metis.h /home/tools/include # 5. Build Lua @@ -93,8 +105,14 @@ RUN wget --progress=bar:force:noscroll https://gitlab.com/libeigen/eigen/-/archi # 7. Build PROJ RUN git clone --depth 1 --single-branch --branch 4.9.3 https://github.com/OSGeo/PROJ.git \ && cd PROJ \ + # 1. Modernize the root CMake requirements + && sed -i 's/cmake_minimum_required(VERSION 2.8.11)/cmake_minimum_required(VERSION 3.5)/g' CMakeLists.txt \ + # 2. Patch the obsolete link policy to use current standards instead of OLD + && sed -i 's/cmake_policy(SET CMP0022 OLD)/cmake_policy(SET CMP0022 NEW)/g' cmake/policies.cmake \ && mkdir build && cd build \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools \ + && CC=mpicc CXX=mpicxx cmake .. \ + -DCMAKE_INSTALL_PREFIX=/home/tools \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ && make -j$(nproc) && make install # 8. Build ASAGI @@ -111,26 +129,36 @@ RUN git clone https://github.com/SeisSol/easi \ && CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF \ && make -j$(nproc) && make install -# Install foundational generation packages alongside PSpaMM via pip3 +# Install PSpaMM via pip3 securely using system bypass flags RUN pip3 install --no-cache-dir --break-system-packages numpy \ && pip3 install --no-cache-dir --break-system-packages git+https://github.com/SeisSol/PSpaMM.git -# 10. Build SeisSol -RUN git clone --recursive https://github.com/SeisSol/SeisSol.git \ +# 10. Build SeisSol (Adaptive Multi-Architecture Evaluator) +ARG TARGETARCH +RUN git clone --recursive --depth 1 https://github.com/SeisSol/SeisSol.git \ && cd SeisSol \ - && mkdir build_hsw && cd build_hsw \ - &&CC=mpicc CXX=mpicxx cmake .. \ + && mkdir build_workspace && cd build_workspace \ + && if [ "$TARGETARCH" = "arm64" ]; then \ + GEMM_TOOLS="PSpaMM"; \ + HOST_ARCH="neon"; \ + else \ + GEMM_TOOLS=auto; \ + HOST_ARCH="hsw"; \ + fi \ + && PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 CC=mpicc CXX=mpicxx cmake .. \ -DCMAKE_PREFIX_PATH=/home/tools \ -DCMAKE_LIBRARY_PATH=/home/tools/lib \ -DCMAKE_INCLUDE_PATH=/home/tools/include \ - -DGEMM_TOOLS_LIST=auto \ - -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=6 -DEQUATIONS=elastic \ + -DGEMM_TOOLS_LIST="$GEMM_TOOLS" \ + -DHOST_ARCH="$HOST_ARCH" \ + -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ + && make -j$(nproc) \ + && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ && make -j$(nproc) \ && cp SeisSol_* /home/tools/bin # 11. Build rconv -RUN cd SeisSol/preprocessing/science/rconv/ \ - && git checkout vikas/rconv-fix \ +RUN cd SeisSol/preprocessing/science/rconv \ && mkdir build && cd build \ && echo "find_package(HDF5 REQUIRED COMPONENTS C HL)" >> ../CMakeLists.txt \ && echo "target_link_libraries(SeisSol-rconv PUBLIC \${HDF5_C_HL_LIBRARIES} \${HDF5_C_LIBRARIES})" >> ../CMakeLists.txt \ @@ -148,7 +176,7 @@ RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git # ========================================== # STAGE 1: Final Lightweight Runtime Image # ========================================== -FROM ubuntu:24.04 +FROM ubuntu:26.04 ENV DEBIAN_FRONTEND=noninteractive @@ -156,13 +184,14 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ gmsh \ + python3-gmsh \ libgomp1 \ libnuma1 \ libopenblas-dev \ - libopenmpi3 \ + libopenmpi-dev \ libtbb12 \ libxrender1 \ - libyaml-cpp0.8 \ + libyaml-cpp-dev \ openmpi-bin \ python3 \ python3-pip \ @@ -171,7 +200,7 @@ RUN apt-get update \ zlib1g \ && rm -rf /var/lib/apt/lists/* -# Install modern Python plotting and visualization stack natively +# Cleanly removed the 'gmsh' token from the pip mapping layer RUN pip3 install --no-cache-dir --break-system-packages \ panel \ ipyvtklink \ @@ -181,14 +210,12 @@ RUN pip3 install --no-cache-dir --break-system-packages \ scipy \ pyproj \ matplotlib \ - gmsh \ sympy \ pandas WORKDIR /home -COPY --from=builder /home/tools tools +COPY --from="builder" /home/tools tools -# Expose modern linking environments globally to runtime contexts ENV PATH="/home/tools/bin:${PATH:-}" ENV LD_LIBRARY_PATH="/home/tools/lib:${LD_LIBRARY_PATH:-}" ENV PYTHONPATH="/home/tools/lib:${PYTHONPATH:-}" From a85f4aa00ce51a9eb60f36658cde9d65b1afa319 Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Thu, 21 May 2026 16:13:12 +0200 Subject: [PATCH 5/8] Working status on hsw --- Dockerfile_jupyterlab | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile_jupyterlab b/Dockerfile_jupyterlab index 0509b0d..c74afa1 100644 --- a/Dockerfile_jupyterlab +++ b/Dockerfile_jupyterlab @@ -185,6 +185,7 @@ RUN apt-get update \ ca-certificates \ gmsh \ python3-gmsh \ + python-is-python3 \ libgomp1 \ libnuma1 \ libopenblas-dev \ From fb8fe560f2b7c03f77369cad113a3db4fa6a8976 Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Tue, 2 Jun 2026 13:58:55 +0200 Subject: [PATCH 6/8] address comments --- Dockerfile_jupyterlab | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile_jupyterlab b/Dockerfile_jupyterlab index c74afa1..1e99754 100644 --- a/Dockerfile_jupyterlab +++ b/Dockerfile_jupyterlab @@ -52,7 +52,7 @@ RUN wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/sr --disable-dependency-tracking \ && make -j$(nproc) && make install -# 2. Build libxsmm (Compiled ONLY on Intel hosts, cleanly skipped on ARM) +# 2. Build libxsmm (Compiled ONLY on amd64 hosts, cleanly skipped on ARM) ARG TARGETARCH RUN if [ "$TARGETARCH" = "amd64" ]; then \ git clone --depth=1 --single-branch --branch 1.17 https://github.com/libxsmm/libxsmm \ @@ -201,7 +201,6 @@ RUN apt-get update \ zlib1g \ && rm -rf /var/lib/apt/lists/* -# Cleanly removed the 'gmsh' token from the pip mapping layer RUN pip3 install --no-cache-dir --break-system-packages \ panel \ ipyvtklink \ From ae9946c2b1cbcfa0d47aec411ad507c482d874dd Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Tue, 2 Jun 2026 14:16:11 +0200 Subject: [PATCH 7/8] modify binary naming --- Dockerfile | 4 ++-- Dockerfile_jupyterlab | 3 ++- README.md | 2 ++ entrypoint.sh | 4 ++-- frontera.md | 3 +-- kaikoura/Kaikoura.ipynb | 4 ++-- northridge/Northridge.ipynb | 6 +++--- quakeworx/README.md | 2 ++ sulawesi/sulawesi.ipynb | 4 ++-- tpv13/tpv13.ipynb | 4 ++-- 10 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b50174..a08d19b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,11 +98,11 @@ RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://gith && cd SeisSol \ && mkdir build_hsw && cd build_hsw \ && export PATH=$PATH:/home/tools/bin \ - && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=LIBXSMM -DHOST_ARCH=hsw -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ + && CC=mpicc CXX=mpicxx cmake .. -DCMAKE_PREFIX_PATH=/home/tools -DGEMM_TOOLS_LIST=LIBXSMM -DHOST_ARCH=hsw -DNEW_BINARY_NAMING=ON -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ && make -j$(nproc) \ && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ && make -j$(nproc) \ - && cp SeisSol_* /home/tools/bin + && cp seissol-* /home/tools/bin RUN cd SeisSol/preprocessing/science/rconv \ && mkdir build && cd build \ diff --git a/Dockerfile_jupyterlab b/Dockerfile_jupyterlab index 1e99754..40d0baf 100644 --- a/Dockerfile_jupyterlab +++ b/Dockerfile_jupyterlab @@ -151,11 +151,12 @@ RUN git clone --recursive --depth 1 https://github.com/SeisSol/SeisSol.git \ -DCMAKE_INCLUDE_PATH=/home/tools/include \ -DGEMM_TOOLS_LIST="$GEMM_TOOLS" \ -DHOST_ARCH="$HOST_ARCH" \ + -DNEW_BINARY_NAMING=ON \ -DASAGI=on -DNETCDF=on -DORDER=4 -DDR_QUAD_RULE_OPTIONS=dunavant \ && make -j$(nproc) \ && cmake .. -DEQUATIONS=viscoelastic2 -DNUMBER_OF_MECHANISMS=3 \ && make -j$(nproc) \ - && cp SeisSol_* /home/tools/bin + && cp seissol-* /home/tools/bin # 11. Build rconv RUN cd SeisSol/preprocessing/science/rconv \ diff --git a/README.md b/README.md index 301d607..6bd55ad 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ The following tools are currently included: - rconv (tool to describe point and finite source models in SeisSol's NetCDF Rupture Format, https://seissol.readthedocs.io/en/latest/standard-rupture-format.html#how-to-use-rconv) - SeisSol O4 (pre-compiled SeisSol with 4th order space-time accuracy for elastic and viscoelastic materials, https://seissol.readthedocs.io). We use the SeisSol `v1.0.1`. See the first lines of the SeisSol output to get the exact commit hash. +The SeisSol binaries in the container use NEW_BINARY_NAMING (e.g., `seissol-cpu-elastic-p4-f64` and `seissol-cpu-viscoelastic-3-p4-f64`). + I.e. ``` diff --git a/entrypoint.sh b/entrypoint.sh index bcaa7ab..cff10dc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,11 +31,11 @@ case "$1" in exec "$@" ;; seissol) - set -- SeisSol_Release_dhsw_4_elastic "${@:2}" + set -- seissol-cpu-elastic-p4-f64 "${@:2}" exec "$@" ;; seissol_viscoelastic) - set -- SeisSol_Release_dhsw_4_viscoelastic2 "${@:2}" + set -- seissol-cpu-viscoelastic-3-p4-f64 "${@:2}" exec "$@" ;; *) diff --git a/frontera.md b/frontera.md index a60175c..f17dc52 100644 --- a/frontera.md +++ b/frontera.md @@ -49,7 +49,7 @@ mpirun apptainer run ~/my-training.sif pumgen -s msh2 mesh_northridge.msh apptainer run ~/my-training.sif rconv -i northridge_resampled.srf -o northridge_resampled.nrf -x visualization.xdmf -m "+proj=tmerc +datum=WGS84 +k=0.9996 +lon_0=-118.5150 +lat_0=34.3440 +axis=enu" OMP_NUM_THREADS=26 mpirun -n 2 apptainer run ~/my-training.sif seissol parameters.par ``` -You can change `seissol` to `SeisSol_Release_dhsw_4_viscoelastic2` if you want to account for attenuation (https://seissol.readthedocs.io/en/latest/attenuation.html) instead of assuming a fully elastic rheology. +You can change `seissol` to `seissol-cpu-viscoelastic-3-p4-f64` if you want to account for attenuation (https://seissol.readthedocs.io/en/latest/attenuation.html) instead of assuming a fully elastic rheology. In Section `Interacting with Frontera from local machine`, we will also show how you may interact with Frontera from your local machine with a Jupyter Lab. @@ -94,4 +94,3 @@ You can directly visualize the results on Frontera: 4. In the paraview GUI, open `output/tpv13-fault.xdmf`. - diff --git a/kaikoura/Kaikoura.ipynb b/kaikoura/Kaikoura.ipynb index 696e929..846faa9 100644 --- a/kaikoura/Kaikoura.ipynb +++ b/kaikoura/Kaikoura.ipynb @@ -78,9 +78,9 @@ "metadata": {}, "outputs": [], "source": [ - "!OMP_NUM_THREADS=4 mpirun -n 1 SeisSol_Release_dhsw_4_elastic parametersLSW.par\n", + "!OMP_NUM_THREADS=4 mpirun -n 1 seissol-cpu-elastic-p4-f64 parametersLSW.par\n", "# on Frontera with apptainer, replace with:\n", - "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} SeisSol_Release_dhsw_4_elastic parametersLSW.par" + "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} seissol-cpu-elastic-p4-f64 parametersLSW.par" ] }, { diff --git a/northridge/Northridge.ipynb b/northridge/Northridge.ipynb index 13f65d2..8a49e6a 100644 --- a/northridge/Northridge.ipynb +++ b/northridge/Northridge.ipynb @@ -413,9 +413,9 @@ "metadata": {}, "outputs": [], "source": [ - "!OMP_NUM_THREADS=4 mpirun -n 1 SeisSol_Release_dhsw_4_elastic parameters.par\n", + "!OMP_NUM_THREADS=4 mpirun -n 1 seissol-cpu-elastic-p4-f64 parameters.par\n", "# on Frontera with apptainer, replace with:\n", - "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} SeisSol_Release_dhsw_4_elastic parameters.par" + "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} seissol-cpu-elastic-p4-f64 parameters.par" ] }, { @@ -447,7 +447,7 @@ "metadata": {}, "outputs": [], "source": [ - "!OMP_NUM_THREADS=4 mpirun -n 1 SeisSol_Release_dhsw_4_viscoelastic2 parameters.par" + "!OMP_NUM_THREADS=4 mpirun -n 1 seissol-cpu-viscoelastic-3-p4-f64 parameters.par" ] } ], diff --git a/quakeworx/README.md b/quakeworx/README.md index aa931cb..f6eb3b5 100644 --- a/quakeworx/README.md +++ b/quakeworx/README.md @@ -3,3 +3,5 @@ The files in this directory have been adjusted compared to the "standard" SeisSol training repository to be readily used for a science gateway for seismic simulations: [Quakeworx Kick-off: Advancing Earthquake Science and Cybertraining in Seismology](https://quakeworx.org/events/quakeworx-kick-off-workshop) The simplest way to access the input files for the Gateway is by running ``git clone https://github.com/SeisSol/Training.git`` from your terminal locally. Make sure to navigate into the folder _quakeworx_ when uploading the input files to the SeisSol App from the Gateway. + +SeisSol binaries in the training container follow NEW_BINARY_NAMING (for example, `seissol-cpu-elastic-p4-f64`). diff --git a/sulawesi/sulawesi.ipynb b/sulawesi/sulawesi.ipynb index 11d4a24..5e7a1da 100644 --- a/sulawesi/sulawesi.ipynb +++ b/sulawesi/sulawesi.ipynb @@ -82,9 +82,9 @@ "metadata": {}, "outputs": [], "source": [ - "!OMP_NUM_THREADS=4 mpirun -n 1 SeisSol_Release_dhsw_4_elastic parametersLSW.par\n", + "!OMP_NUM_THREADS=4 mpirun -n 1 seissol-cpu-elastic-p4-f64 parametersLSW.par\n", "# on Frontera with apptainer, replace with:\n", - "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} SeisSol_Release_dhsw_4_elastic parametersLSW.par" + "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} seissol-cpu-elastic-p4-f64 parametersLSW.par" ] }, { diff --git a/tpv13/tpv13.ipynb b/tpv13/tpv13.ipynb index 3af0c25..02b5bc1 100644 --- a/tpv13/tpv13.ipynb +++ b/tpv13/tpv13.ipynb @@ -136,9 +136,9 @@ "metadata": {}, "outputs": [], "source": [ - "!OMP_NUM_THREADS=4 mpirun -n 1 SeisSol_Release_dhsw_4_elastic parameters.par\n", + "!OMP_NUM_THREADS=4 mpirun -n 1 seissol-cpu-elastic-p4-f64 parameters.par\n", "# on Frontera with apptainer, replace with:\n", - "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} SeisSol_Release_dhsw_4_elastic parameters.par" + "# !SEISSOL_COMMTHREAD=0 OMP_NUM_THREADS=28 mpirun -n 2 apptainer run {\"~/my-training.sif\"} seissol-cpu-elastic-p4-f64 parameters.par" ] }, { From 7701e3bc61d813b7117e0268fc0ae2eab11156ca Mon Sep 17 00:00:00 2001 From: Vikas Kurapati Date: Tue, 2 Jun 2026 17:17:36 +0200 Subject: [PATCH 8/8] add note in readme about memory change label address comments --- README.md | 13 ++++--------- quakeworx/README.md | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6bd55ad..b3e8a0b 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,15 @@ The Docker container contains an interactive learning environment (Jupyter) whic Please install [Docker](https://docs.docker.com/engine/install/), launch the Docker Desktop and then run -(i) For Frontera and all Intel/AMD machines: - - use label: latest - -(ii) Macs with M1/M2/M3 ARM CPUs: - - use label: hps-2024-remote-arm ```bash -docker pull seissol/training:{label} +docker pull seissol/training ``` ## Training -After installation, run +After installation, we recommend assigning at least 8 GB of memory to Docker so all simulations run smoothly. Run ```bash -docker run -p 53155:53155 seissol/training:{label} +docker run --memory=8g -p 53155:53155 seissol/training ``` or run the [start.sh](start.sh) script. @@ -48,7 +43,7 @@ The following tools are currently included: - rconv (tool to describe point and finite source models in SeisSol's NetCDF Rupture Format, https://seissol.readthedocs.io/en/latest/standard-rupture-format.html#how-to-use-rconv) - SeisSol O4 (pre-compiled SeisSol with 4th order space-time accuracy for elastic and viscoelastic materials, https://seissol.readthedocs.io). We use the SeisSol `v1.0.1`. See the first lines of the SeisSol output to get the exact commit hash. -The SeisSol binaries in the container use NEW_BINARY_NAMING (e.g., `seissol-cpu-elastic-p4-f64` and `seissol-cpu-viscoelastic-3-p4-f64`). +The SeisSol binaries in the container use new binary naming (e.g., `seissol-cpu-elastic-p4-f64` and `seissol-cpu-viscoelastic-3-p4-f64`). I.e. diff --git a/quakeworx/README.md b/quakeworx/README.md index f6eb3b5..033b41c 100644 --- a/quakeworx/README.md +++ b/quakeworx/README.md @@ -4,4 +4,4 @@ The files in this directory have been adjusted compared to the "standard" SeisSo The simplest way to access the input files for the Gateway is by running ``git clone https://github.com/SeisSol/Training.git`` from your terminal locally. Make sure to navigate into the folder _quakeworx_ when uploading the input files to the SeisSol App from the Gateway. -SeisSol binaries in the training container follow NEW_BINARY_NAMING (for example, `seissol-cpu-elastic-p4-f64`). +SeisSol binaries in the training container follow new binary naming (for example, `seissol-cpu-elastic-p4-f64`).