From cab2e9535f8592bd8e1dc96276918070305ff2df Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 24 Oct 2025 09:57:11 +0200 Subject: [PATCH 1/6] set more env vars for container --- .docker/fedora/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.docker/fedora/Dockerfile b/.docker/fedora/Dockerfile index 56445f8cea..e4a10a263c 100644 --- a/.docker/fedora/Dockerfile +++ b/.docker/fedora/Dockerfile @@ -22,7 +22,7 @@ RUN git clone $URL \ && git checkout $COMMIT \ && git submodule update --init --recursive - +ENV HOME=/home/boutuser WORKDIR /home/boutuser/BOUT-dev RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \ @@ -36,4 +36,11 @@ RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \ RUN make -C build -j 2 RUN sudo make -C build install +ENV PATH=/opt/bout++/bin:$PATH \ + LD_LIBRARY_PATH=/opt/bout++/lib:/opt/petsc/lib/:$LD_LIBRARY_PATH \ + PYTHONPATH=/opt/bout++/lib/python3.13/site-packages/:$PYTHONPATH + +# Debug RUN find /opt/bout++ +# smoke test +RUN python3 -c 'import boutpp' From 6d856001e0c34ee19cfd2451ff0afd1e7c294dae Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 24 Oct 2025 09:57:37 +0200 Subject: [PATCH 2/6] CI: Build container for test branch --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1380d0ea8e..39c9891338 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: - master - next # Add your branch here if you want containers for it - - db-WIP + - fix3121 - docker-ci env: From 802f8a09b8cb9cc7c6dfacc0688e72eb26b87489 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 24 Oct 2025 10:08:32 +0200 Subject: [PATCH 3/6] Build in one step --- .docker/fedora/Dockerfile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.docker/fedora/Dockerfile b/.docker/fedora/Dockerfile index e4a10a263c..e152103255 100644 --- a/.docker/fedora/Dockerfile +++ b/.docker/fedora/Dockerfile @@ -25,22 +25,19 @@ RUN git clone $URL \ ENV HOME=/home/boutuser WORKDIR /home/boutuser/BOUT-dev -RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \ +RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \ -DBOUT_GENERATE_FIELDOPS=OFF \ - -DBOUT_USE_PETSC=ON -DPETSc_ROOT=/opt/petsc \ + -DBOUT_USE_PETSC=ON -DPETSc_ROOT=/usr/local \ -DBOUT_ENABLE_PYTHON=ON \ -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/usr/lib64/$MPI/ -DSUNDIALS_INCLUDE_DIR=/usr/include/$MPI-x86_64/sundials/ \ - $CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1) + $CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1) \ + make -C build -j 2 \ + sudo make -C build install \ + rm -rf build +ENV PATH=/usr/local/bin:$PATH \ + LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \ + PYTHONPATH=/usr/local/lib/python3.13/site-packages/:$PYTHONPATH -RUN make -C build -j 2 -RUN sudo make -C build install - -ENV PATH=/opt/bout++/bin:$PATH \ - LD_LIBRARY_PATH=/opt/bout++/lib:/opt/petsc/lib/:$LD_LIBRARY_PATH \ - PYTHONPATH=/opt/bout++/lib/python3.13/site-packages/:$PYTHONPATH - -# Debug -RUN find /opt/bout++ # smoke test RUN python3 -c 'import boutpp' From 9542428ddd0ba6130262a145e01337f95598b339 Mon Sep 17 00:00:00 2001 From: David Bold Date: Fri, 24 Oct 2025 10:13:01 +0200 Subject: [PATCH 4/6] Fixup: add ; at end of line --- .docker/fedora/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/fedora/Dockerfile b/.docker/fedora/Dockerfile index e152103255..2b6800ce21 100644 --- a/.docker/fedora/Dockerfile +++ b/.docker/fedora/Dockerfile @@ -30,9 +30,9 @@ RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \ -DBOUT_USE_PETSC=ON -DPETSc_ROOT=/usr/local \ -DBOUT_ENABLE_PYTHON=ON \ -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/usr/lib64/$MPI/ -DSUNDIALS_INCLUDE_DIR=/usr/include/$MPI-x86_64/sundials/ \ - $CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1) \ - make -C build -j 2 \ - sudo make -C build install \ + $CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1); \ + make -C build -j 2; \ + sudo make -C build install; \ rm -rf build ENV PATH=/usr/local/bin:$PATH \ From 305e1773088daa8e5954db18a176ebc3b3a0c537 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 2 Dec 2025 14:05:54 +0100 Subject: [PATCH 5/6] Add unversioned python path --- .docker/fedora/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.docker/fedora/Dockerfile b/.docker/fedora/Dockerfile index 2b6800ce21..5d74886b50 100644 --- a/.docker/fedora/Dockerfile +++ b/.docker/fedora/Dockerfile @@ -35,9 +35,12 @@ RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \ sudo make -C build install; \ rm -rf build +# Add unversioned path for python +RUN sudo ln -s /usr/local/lib/python3.* /usr/local/lib/python3.x/ + ENV PATH=/usr/local/bin:$PATH \ LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \ - PYTHONPATH=/usr/local/lib/python3.13/site-packages/:$PYTHONPATH + PYTHONPATH=/usr/local/lib/python3.x/site-packages/:$PYTHONPATH # smoke test RUN python3 -c 'import boutpp' From 938ca44bc62aa91f0d655652f9548521c36174c1 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 2 Dec 2025 14:52:51 +0100 Subject: [PATCH 6/6] Fix ln command --- .docker/fedora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/fedora/Dockerfile b/.docker/fedora/Dockerfile index 5d74886b50..da4d2d9fac 100644 --- a/.docker/fedora/Dockerfile +++ b/.docker/fedora/Dockerfile @@ -36,7 +36,7 @@ RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \ rm -rf build # Add unversioned path for python -RUN sudo ln -s /usr/local/lib/python3.* /usr/local/lib/python3.x/ +RUN sudo ln -s /usr/local/lib/python3.* /usr/local/lib/python3.x ENV PATH=/usr/local/bin:$PATH \ LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \