Skip to content

Commit 11142d5

Browse files
authored
Merge pull request #3221 from boutproject/fix3121
Fix container build
2 parents 720e7b8 + 938ca44 commit 11142d5

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.docker/fedora/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,25 @@ RUN git clone $URL \
2222
&& git checkout $COMMIT \
2323
&& git submodule update --init --recursive
2424

25-
25+
ENV HOME=/home/boutuser
2626
WORKDIR /home/boutuser/BOUT-dev
2727

28-
RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \
28+
RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \
2929
-DBOUT_GENERATE_FIELDOPS=OFF \
30-
-DBOUT_USE_PETSC=ON -DPETSc_ROOT=/opt/petsc \
30+
-DBOUT_USE_PETSC=ON -DPETSc_ROOT=/usr/local \
3131
-DBOUT_ENABLE_PYTHON=ON \
3232
-DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/usr/lib64/$MPI/ -DSUNDIALS_INCLUDE_DIR=/usr/include/$MPI-x86_64/sundials/ \
33-
$CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1)
33+
$CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1); \
34+
make -C build -j 2; \
35+
sudo make -C build install; \
36+
rm -rf build
3437

38+
# Add unversioned path for python
39+
RUN sudo ln -s /usr/local/lib/python3.* /usr/local/lib/python3.x
3540

36-
RUN make -C build -j 2
37-
RUN sudo make -C build install
41+
ENV PATH=/usr/local/bin:$PATH \
42+
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
43+
PYTHONPATH=/usr/local/lib/python3.x/site-packages/:$PYTHONPATH
3844

39-
RUN find /opt/bout++
45+
# smoke test
46+
RUN python3 -c 'import boutpp'

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77
- next
88
# Add your branch here if you want containers for it
9-
- db-WIP
9+
- fix3121
1010
- docker-ci
1111

1212
env:

0 commit comments

Comments
 (0)