Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ openfoam-adapter:
template: component-templates/openfoam-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand Down
38 changes: 21 additions & 17 deletions tools/tests/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bare: # A default component used when the solver does not have any dependencies
template: component-templates/bare.yaml
build_arguments: # these things mean something to the docker-service
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -16,7 +16,7 @@ calculix-adapter:
template: component-templates/calculix-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -35,7 +35,7 @@ dealii-adapter:
template: component-templates/dealii-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -53,7 +53,7 @@ dumux-adapter:
build_timeout: 900
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -75,7 +75,7 @@ dune-adapter:
build_timeout: 900
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -97,7 +97,7 @@ solids4foam:
build_arguments:
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2404"
default: "ubuntu_2604"
# The name "PLATFORM" is misleading: For this component, we use a different base image.
TUTORIALS_REF:
description: Tutorial git reference to use
Expand All @@ -108,9 +108,10 @@ solids4foam:

fenics-adapter:
template: component-templates/fenics-adapter.yaml
build_timeout: 600
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -130,7 +131,7 @@ fenicsx-adapter:
template: component-templates/fenicsx-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -148,9 +149,10 @@ fenicsx-adapter:

fmi-runner:
template: component-templates/fmi-runner.yaml
build_timeout: 600
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -170,7 +172,7 @@ mercurydpm-adapter:
template: component-templates/mercurydpm-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -184,7 +186,7 @@ micro-manager:
template: component-templates/micro-manager.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -199,9 +201,10 @@ micro-manager:

nutils-adapter:
template: component-templates/nutils-adapter.yaml
build_timeout: 600
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -218,7 +221,7 @@ openfoam-adapter:
template: component-templates/openfoam-adapter.yaml
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -235,9 +238,10 @@ openfoam-adapter:

python-bindings:
template: component-templates/python-bindings.yaml
build_timeout: 600
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -252,10 +256,10 @@ python-bindings:

su2-adapter:
template: component-templates/su2-adapter.yaml
build_timeout: 600
build_timeout: 900
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
PRECICE_REF:
repository: https://github.com/precice/precice
default: "develop"
Expand All @@ -275,7 +279,7 @@ aste:
build_timeout: 600
build_arguments:
PLATFORM:
default: "ubuntu_2404"
default: "ubuntu_2604"
# The name "PLATFORM" is misleading: For this component, we use a different base image.
PRECICE_REF:
repository: https://github.com/precice/precice
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:24.04 AS base_image
FROM ubuntu:26.04 AS base_image
# We set a senseful value, but still have the possibility to influence this via the build time arguments.
# When the dockerfile is built using the systemtests.py we set the PRECICE_UID and PRECICE_GID to the user executing the system tests.
# This ensures no file ownership problems down the line and is the easiest fix, as we normally build the containers locally
Expand Down Expand Up @@ -99,6 +99,40 @@ ENV CMAKE_PREFIX_PATH="/home/precice/.local"
### end of precice stage ###


FROM precice AS aste

ARG ASTE_PR
ARG ASTE_REF

USER root
RUN apt-get -qq update && \
apt-get -qq -y install \
libmetis-dev \
libvtk9-dev

USER precice
WORKDIR /home/precice

RUN git clone https://github.com/precice/aste.git aste && \
cd aste && \
if [ -n "${ASTE_PR}" ]; then git fetch origin pull/${ASTE_PR}/head; fi && \
git checkout ${ASTE_REF}

RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip install -r /home/precice/aste/requirements.txt && \
pip install vtk

RUN cd /home/precice/aste && \
mkdir build && cd build &&\
cmake .. -DCMAKE_INSTALL_PREFIX=/home/precice/.local/ && \
make all install -j $(nproc) && \
cd ../.. && rm -rf aste

WORKDIR /home/precice
### end of aste stage ###


FROM precice AS python_bindings
ARG PYTHON_BINDINGS_PR
ARG PYTHON_BINDINGS_REF
Expand Down Expand Up @@ -251,6 +285,8 @@ RUN for i in $(seq 1 3); do \
if [[ $i -eq 3 ]]; then exit 1; fi; \
sleep 10; \
done
# Patch dumux-phasefield for Ubuntu 26.04
RUN sed -i s/VERSION\ 3.1/VERSION\ 3.13/g dumux-phasefield/CMakeLists.txt
RUN ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts cmake &&\
./dune-common/bin/dunecontrol make -j $(nproc)

Expand Down Expand Up @@ -355,9 +391,8 @@ COPY --from=python_bindings /home/precice/.local /home/precice/.local
ARG FENICS_ADAPTER_REF

USER root
RUN add-apt-repository -y ppa:fenics-packages/fenics && \
apt-get -qq update && \
apt-get -qq install --no-install-recommends fenics
RUN apt-get -qq update && \
apt-get -qq install fenics

USER precice
RUN python3 -m venv --system-site-packages /home/precice/venv && \
Expand All @@ -371,9 +406,8 @@ COPY --from=python_bindings /home/precice/.local /home/precice/.local
ARG FENICSX_ADAPTER_REF

USER root
RUN add-apt-repository -y ppa:fenics-packages/fenics && \
apt-get -qq update && \
apt-get -qq install --no-install-recommends fenicsx
RUN apt-get -qq update && \
apt-get -qq install fenicsx

USER precice
RUN python3 -m venv --system-site-packages /home/precice/venv && \
Expand Down Expand Up @@ -432,17 +466,14 @@ RUN apt-get -qq update && \
USER precice
WORKDIR /home/precice
# Download and build SU2 (We could also use pre-built binaries from the SU2 releases)
# The sed command applies a patch needed for Ubuntu 24.04.
RUN wget -nv https://github.com/su2code/SU2/archive/refs/tags/v${SU2_VERSION}.tar.gz && \
tar xvzf v${SU2_VERSION}.tar.gz && \
rm -fv v${SU2_VERSION}.tar.gz
RUN git clone --depth=1 --branch=v${SU2_VERSION} --recurse-submodules https://github.com/su2code/SU2.git
RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate

# Some of these variables are used by the scripts that follow
WORKDIR /home/precice
ENV SU2_RUN="/home/precice/SU2_RUN"
ENV SU2_HOME="/home/precice/SU2-${SU2_VERSION}"
ENV SU2_HOME="/home/precice/SU2"
ENV PATH="/home/precice/su2-adapter/run:$SU2_RUN:$PATH"
ENV PYTHONPATH="$SU2_RUN:$PYTHONPATH"

Expand All @@ -451,9 +482,14 @@ RUN git clone https://github.com/precice/su2-adapter.git && \
if [ -n "${SU2_ADAPTER_PR}" ]; then git fetch origin pull/${SU2_ADAPTER_PR}/head; fi && \
git checkout ${SU2_ADAPTER_REF} &&\
./su2AdapterInstall

# Build the modified SU2.
# The sed commands apply patches needed for newer systems.
RUN cd "${SU2_HOME}" &&\
sed -i '1s/^/#include <cstdint>\n/' SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp &&\
./meson.py build -Denable-pywrapper=true --prefix=$SU2_RUN &&\
sed -i '1s/^/#include <cstdint>\n/' SU2_CFD/src/SU2_CFD.cpp &&\
sed -i 's/pipes/shlex/g' externals/ninja/configure.py &&\
./meson.py build -Denable-pywrapper=true -Denable-cgns=false -Denable-tecio=false --prefix=$SU2_RUN &&\
./ninja -C build install
### end of su2_adapter stage ###

Expand All @@ -463,113 +499,7 @@ RUN cd "${SU2_HOME}" &&\
#####################################################################


FROM ubuntu:26.04 AS aste

ARG PRECICE_UID=1000
ARG PRECICE_GID=1000
ARG PRECICE_PR
ARG PRECICE_REF
ARG PRECICE_PRESET
ARG ASTE_PR
ARG ASTE_REF

USER root
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

# Set the same user as the rest of the system tests components, for consistency.
RUN set -eux; \
if getent group "${PRECICE_GID}" >/dev/null; then \
existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \
if [ "${existing_group}" != "precice" ]; then \
groupmod -n precice "${existing_group}"; \
fi; \
else \
groupadd -g "${PRECICE_GID}" precice; \
fi; \
if getent passwd "${PRECICE_UID}" >/dev/null; then \
existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \
if [ "${existing_user}" != "precice" ]; then \
usermod -l precice -d /home/precice -m "${existing_user}"; \
fi; \
usermod -g "${PRECICE_GID}" precice; \
else \
useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \
fi; \
mkdir -p /home/precice; \
chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice

# Dependencies for preCICE and common dependencies for the tutorials/tests
RUN apt-get -qq update && \
apt-get -qq -y install \
build-essential \
software-properties-common \
cmake \
curl \
g++ \
gfortran \
git \
libbenchmark-dev \
libboost-all-dev \
libeigen3-dev \
libopenmpi-dev \
libxml2-dev \
lsb-release \
openmpi-bin \
petsc-dev \
python3-dev \
python3-numpy \
python3-pip \
python3-venv \
pkg-config \
wget \
inotify-tools

# Additional dependencies for ASTE
RUN apt-get -qq update && \
apt-get -qq -y install \
libmetis-dev \
libvtk9-dev

USER precice
WORKDIR /home/precice

# Build & install precice into /home/precice/precice
RUN git clone https://github.com/precice/precice.git precice && \
cd precice && \
if [ -n "${PRECICE_PR}" ]; then git fetch origin pull/${PRECICE_PR}/head; fi && \
git checkout ${PRECICE_REF} && \
mkdir build && cd build &&\
cmake .. --preset=${PRECICE_PRESET} -DCMAKE_INSTALL_PREFIX=/home/precice/.local/ -DBUILD_TESTING=OFF && \
make all install -j $(nproc) && \
cd ../.. && rm -rf precice

ENV PATH="${PATH}:/home/precice/.local/bin"
ENV LD_LIBRARY_PATH="/home/precice/.local/lib"
ENV CPATH="/home/precice/.local/include"
ENV PKG_CONFIG_PATH="/home/precice/.local/lib/pkgconfig"
ENV CMAKE_PREFIX_PATH="/home/precice/.local"

RUN git clone https://github.com/precice/aste.git aste && \
cd aste && \
if [ -n "${ASTE_PR}" ]; then git fetch origin pull/${ASTE_PR}/head; fi && \
git checkout ${ASTE_REF}

RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip install -r /home/precice/aste/requirements.txt && \
pip install vtk

RUN cd /home/precice/aste && \
mkdir build && cd build &&\
cmake .. -DCMAKE_INSTALL_PREFIX=/home/precice/.local/ && \
make all install -j $(nproc) && \
cd ../.. && rm -rf aste

WORKDIR /home/precice


FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam
FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest AS solids4foam

ARG PRECICE_UID=1000
ARG PRECICE_GID=1000
Expand Down
Loading