Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7d52ae3
systemtests: fix Python bindings version ignored due to tutorial venv…
AdityaGupta716 Mar 8, 2026
e3ac6fc
Merge branch 'develop' into systemtests/fix-python-bindings-venv
AdityaGupta716 Mar 8, 2026
ad161ed
systemtests: add precice import sanity check when PRECICE_TUTORIALS_N…
AdityaGupta716 Mar 8, 2026
a24e9a5
systemtests: set PRECICE_TUTORIALS_NO_VENV in su2-adapter template; f…
AdityaGupta716 Mar 8, 2026
cc03099
fix: update changelog entry to reflect all changes in #584 fix
AdityaGupta716 Mar 8, 2026
9153bd3
Add sanity check for precice importability when PRECICE_TUTORIALS_NO_…
AdityaGupta716 Mar 9, 2026
00e12ea
Update changelog to reflect su2-adapter and sanity check additions
AdityaGupta716 Mar 9, 2026
5b14ee4
Merge branch 'develop' into systemtests/fix-python-bindings-venv
AdityaGupta716 Mar 12, 2026
fe39321
fix: align timeout constants with add-timeout-support; add precice sa…
AdityaGupta716 Mar 15, 2026
5d65b6a
Merge branch 'develop' into systemtests/fix-python-bindings-venv
AdityaGupta716 Mar 16, 2026
700b897
Merge branch 'develop' into systemtests/fix-python-bindings-venv
MakisH May 16, 2026
dc1bec2
Revert unrelated changes in systemtests/Systemtest.py
MakisH May 16, 2026
153a00b
Rework changelog entry
MakisH May 16, 2026
aec6e5b
Fix a few more --system-site-package[s] typos
MakisH May 16, 2026
62c0675
Add missing ENV for the SU2 adapter and Micro-Manager
MakisH May 16, 2026
76327d3
Fix fail-fast logic
MakisH May 17, 2026
8338a34
Fix a remaining system-site-package[s] typo
MakisH May 17, 2026
36839b3
Fix logic in the Dockerfile
MakisH May 17, 2026
12d691d
Remove no-op COPY commands
MakisH May 17, 2026
c9cf77f
Restore ENV commands in python_bindings stage
MakisH May 17, 2026
7285881
Remove unused venv activate commands
MakisH May 17, 2026
2e32a35
Add PRECICE_TUTORIALS_NO_VENV to micro-manager component
MakisH May 17, 2026
eb376ac
Remove redundant copy
MakisH May 17, 2026
29eb461
FEniCS adapter: Enable global venv again
MakisH May 17, 2026
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
1 change: 1 addition & 0 deletions changelog-entries/745.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed an issue regarding the Python bindings version being ignored in the system tests [#745](https://github.com/precice/tutorials/pull/745)
2 changes: 1 addition & 1 deletion channel-transport-reaction/chemical-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec > >(tee --append "$LOGFILE") 2>&1

if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv --system-site-package .venv
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
Expand Down
2 changes: 1 addition & 1 deletion channel-transport-reaction/fluid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec > >(tee --append "$LOGFILE") 2>&1

if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv --system-site-package .venv
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
Expand Down
2 changes: 1 addition & 1 deletion elastic-tube-3d/solid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec > >(tee --append "$LOGFILE") 2>&1

if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv --system-site-package .venv
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
Expand Down
2 changes: 1 addition & 1 deletion flow-over-heated-plate/fluid-su2/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec > >(tee --append "$LOGFILE") 2>&1

if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv --system-site-package .venv
python3 -m venv --system-site-packages .venv
Comment thread
MakisH marked this conversation as resolved.
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
Expand Down
2 changes: 1 addition & 1 deletion flow-over-heated-plate/solid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec > >(tee --append "$LOGFILE") 2>&1

if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv --system-site-package .venv
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
Expand Down
5 changes: 4 additions & 1 deletion tools/tests/component-templates/fenics-adapter.yaml
Comment thread
MakisH marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ build:
- {{key}}={{value}}
{% endfor %}
target: fenics_adapter
environment:
- PRECICE_TUTORIALS_NO_VENV=1
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
/bin/bash -c "id &&
([ -z \"$$PRECICE_TUTORIALS_NO_VENV\" ] || { python3 -c 'import precice' || { echo 'ERROR: PRECICE_TUTORIALS_NO_VENV set but precice not importable. Check Docker image.'; exit 1; }; }) &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
3 changes: 3 additions & 0 deletions tools/tests/component-templates/micro-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ build:
- {{key}}={{value}}
{% endfor %}
target: micro_manager
environment:
- PRECICE_TUTORIALS_NO_VENV=1
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
([ -z \"$$PRECICE_TUTORIALS_NO_VENV\" ] || { python3 -c 'import precice' || { echo 'ERROR: PRECICE_TUTORIALS_NO_VENV set but precice not importable. Check Docker image.'; exit 1; }; }) &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
5 changes: 4 additions & 1 deletion tools/tests/component-templates/nutils-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ build:
- {{key}}={{value}}
{% endfor %}
target: nutils_adapter
environment:
- PRECICE_TUTORIALS_NO_VENV=1
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
/bin/bash -c "id &&
([ -z \"$$PRECICE_TUTORIALS_NO_VENV\" ] || { python3 -c 'import precice' || { echo 'ERROR: PRECICE_TUTORIALS_NO_VENV set but precice not importable. Check Docker image.'; exit 1; }; }) &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
5 changes: 4 additions & 1 deletion tools/tests/component-templates/python-bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ build:
- {{key}}={{value}}
{% endfor %}
target: python_bindings
environment:
- PRECICE_TUTORIALS_NO_VENV=1
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
/bin/bash -c "id &&
([ -z \"$$PRECICE_TUTORIALS_NO_VENV\" ] || { python3 -c 'import precice' || { echo 'ERROR: PRECICE_TUTORIALS_NO_VENV set but precice not importable. Check Docker image.'; exit 1; }; }) &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
5 changes: 4 additions & 1 deletion tools/tests/component-templates/su2-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ build:
- {{key}}={{value}}
{% endfor %}
target: su2_adapter
environment:
- PRECICE_TUTORIALS_NO_VENV=1
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
/bin/bash -c "id &&
([ -z \"$$PRECICE_TUTORIALS_NO_VENV\" ] || { python3 -c 'import precice' || { echo 'ERROR: PRECICE_TUTORIALS_NO_VENV set but precice not importable. Check Docker image.'; exit 1; }; }) &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
SU2_RUN="/home/precice/SU2_RUN/bin" PYTHONPATH="/home/precice/SU2_RUN/bin:$PYTHONPATH" {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
34 changes: 11 additions & 23 deletions tools/tests/dockerfiles/ubuntu_2404/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,32 +107,28 @@ USER precice
WORKDIR /home/precice
# Builds the precice python bindings for python3
# Installs also matplotlib as its needed for the elastic-tube 1d fluid-python participant.
RUN python3 -m venv /home/precice/venv && \
RUN python3 -m venv --system-site-packages /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip3 install git+https://github.com/precice/python-bindings.git@${PYTHON_BINDINGS_REF} && \
pip3 install matplotlib
pip3 install matplotlib
Comment thread
MakisH marked this conversation as resolved.
ENV VIRTUAL_ENV=/home/precice/venv
ENV PATH="/home/precice/venv/bin:$PATH"

FROM precice_dependecies AS fenics_adapter
COPY --from=python_bindings /home/precice/.local /home/precice/.local
FROM python_bindings AS fenics_adapter
USER root
RUN add-apt-repository -y ppa:fenics-packages/fenics && \
apt-get -qq update && \
apt-get -qq install --no-install-recommends fenics
USER precice
ARG FENICS_ADAPTER_REF
# Building fenics-adapter
RUN python3 -m venv --system-site-packages /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip3 install git+https://github.com/precice/fenics-adapter.git@${FENICS_ADAPTER_REF}
RUN pip3 install git+https://github.com/precice/fenics-adapter.git@${FENICS_ADAPTER_REF}


FROM precice_dependecies AS nutils_adapter
COPY --from=python_bindings /home/precice/.local /home/precice/.local
FROM python_bindings AS nutils_adapter
USER precice
# Installing nutils - There is no adapter
RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip3 install nutils
RUN pip3 install nutils


FROM precice_dependecies AS calculix_adapter
Expand All @@ -159,7 +155,6 @@ RUN git clone https://github.com/precice/calculix-adapter.git && \
ln -s /home/precice/calculix-adapter/bin/ccx_preCICE /home/precice/.local/bin/ccx_preCICE

FROM python_bindings AS su2_adapter
COPY --from=precice /home/precice/.local /home/precice/.local
USER root
RUN apt-get -qq update && \
apt-get -qq install swig python3-mpi4py python3-setuptools
Expand All @@ -172,8 +167,6 @@ WORKDIR /home/precice
RUN wget 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 python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate
ARG SU2_ADAPTER_PR
ARG SU2_ADAPTER_REF
WORKDIR /home/precice
Expand Down Expand Up @@ -211,27 +204,22 @@ RUN git clone https://github.com/precice/dealii-adapter.git &&\
make -j $(nproc)


FROM precice_dependecies AS micro_manager
FROM python_bindings AS micro_manager
Comment thread
MakisH marked this conversation as resolved.
USER precice
WORKDIR /home/precice
COPY --from=precice /home/precice/.local/ /home/precice/.local/
Comment thread
MakisH marked this conversation as resolved.
Outdated

ARG MICRO_MANAGER_REF
RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate && \
git clone https://github.com/precice/micro-manager.git && \
RUN git clone https://github.com/precice/micro-manager.git && \
cd micro-manager && \
if [ -n "${MICRO_MANAGER_PR}" ]; then git fetch origin pull/${MICRO_MANAGER_PR}/head; fi && \
git checkout ${MICRO_MANAGER_REF} && \
pip3 install .
RUN pip3 install pybind11
WORKDIR /home/precice
RUN python3 -m venv /home/precice/venv && \
. /home/precice/venv/bin/activate && \
pip3 install pybind11

FROM micro_manager AS dumux_adapter
USER root
COPY --from=precice /home/precice/.local/ /home/precice/.local/
ARG DUNE_VERSION
ARG DUMUX_VERSION
USER precice
Expand Down