Skip to content

Commit

Permalink
[docker] cleanup precice versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiskelm committed Mar 12, 2024
1 parent f7ec353 commit 882f1ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ The versions of the main dependencies can be manipulated when building the Docke

- `ARG DUNEVERSION=2.9`: DUNE version. Available in all recipes.
- `ARG DUMUXVERSION=3.7`: DuMuX version. Available in all recipes.
- `ARG PRECICEVERSION=develop`: preCICE version. Available only in "large" and "slim" recipes.
- `ARG PRECICEVERSION=3.0.0`: preCICE version. Available only in "large" and "slim" (use branch name e.g. "v3.0.0" or "develop") recipes.
- `ARG PRECICEUBUNTU=focal`: preCICE target platform (here, Ubuntu Focal Fossa). Available only in "large" recipe.

If one wants to build a "slim" image using DUNE 2.9, DuMuX from the current master branch and preCICE 3.0.0 one could call it with the following command:

```text
sudo docker build --build-arg DUNEVERSION=2.9 --build-arg DUMUXVERSION=master --build-arg PRECICEVERSION=3.0.0 -t precice/dumux-precice:master-3.0.0 --file dockerfile.slim .
sudo docker build --build-arg DUNEVERSION=2.9 --build-arg DUMUXVERSION=master --build-arg PRECICEVERSION=v3.0.0 -t precice/dumux-precice:master-v3.0.0 --file dockerfile.slim .
```

The script `rebuild-docker-images.sh` can be used to rebuild the Docker images locally.
4 changes: 2 additions & 2 deletions docker/dockerfile.large
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ ENV DUNE_CONTROL_PATH=${USER_HOME}/dune-common/dune.module:${USER_HOME}/dune-geo
ENV PYTHONPATH ${USER_HOME}/dumux/bin/testing:${PYTHONPATH}

#Install preCICE
ARG PRECICEVERSION=2.2.1
ARG PRECICEVERSION=3.0.0
ARG PRECICEUBUNTU=focal
RUN wget https://github.com/precice/precice/releases/download/v${PRECICEVERSION}/libprecice2_${PRECICEVERSION}_${PRECICEUBUNTU}.deb -O libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \
RUN wget https://github.com/precice/precice/releases/download/v${PRECICEVERSION}/libprecice3_${PRECICEVERSION}_${PRECICEUBUNTU}.deb -O libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \
&& apt install -y ./libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb \
&& rm -f ./libprecice${PRECICEVERSION}-${PRECICEUBUNTU}.deb

Expand Down
3 changes: 1 addition & 2 deletions docker/dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ ENV DUNE_CONTROL_PATH=${DUMUXINSTALLPATH}/dune-common/dune.module:${DUMUXINSTALL
ENV PYTHONPATH ${DUMUXINSTALLPATH}/dumux/bin/testing:${PYTHONPATH}

# Compile minmum version of preCICE
#ARG PRECICEVERSION=2.4.0
ARG PRECICEVERSION=develop
ARG PRECICEVERSION=v3.0.0
ARG PRECICEUBUNTU=focal
RUN git clone --depth 1 -b ${PRECICEVERSION} https://github.com/precice/precice.git precice-${PRECICEVERSION} && cd precice-${PRECICEVERSION} && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DCMAKE_INSTALL_PREFIX=/usr && make -j 4 && make test && make install && cd ../../ && rm -rf precice-${PRECICEVERSION}

Expand Down
3 changes: 1 addition & 2 deletions docker/dockerfile_dune-precice.slim
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ RUN dunecontrol --opts=cmake-test.opts all
ENV DUNE_CONTROL_PATH=${DUMUXINSTALLPATH}/dune-common/dune.module:${DUMUXINSTALLPATH}/dune-geometry/dune.module:${DUMUXINSTALLPATH}/dune-grid/dune.module:${DUMUXINSTALLPATH}/dune-localfunctions/dune.module:${DUMUXINSTALLPATH}/dune-istl/dune.module:${DUMUXINSTALLPATH}/dune-subgrid/dune.module

# Compile minmum version of preCICE
#ARG PRECICEVERSION=2.4.0
ARG PRECICEVERSION=develop
ARG PRECICEVERSION=v3.0.0
ARG PRECICEUBUNTU=focal
RUN git clone --depth 1 -b ${PRECICEVERSION} https://github.com/precice/precice.git precice-${PRECICEVERSION} && cd precice-${PRECICEVERSION} && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DCMAKE_INSTALL_PREFIX=/usr && make -j 4 && make test && make install && cd ../../ && rm -rf precice-${PRECICEVERSION}

Expand Down

0 comments on commit 882f1ee

Please sign in to comment.