Skip to content

Commit

Permalink
Update docker image with build isolation (#115)
Browse files Browse the repository at this point in the history
* Update docker image with build isolation

* Revert version bound

* Pin sonarcloud versions
  • Loading branch information
jorgensd authored Apr 25, 2024
1 parent de949a2 commit 86677c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ jobs:
uses: jorgensd/actions/install-dolfinx@v0.2.0
with:
petsc_arch: ${PETSC_ARCH}
dolfinx: main

dolfinx: v0.8.0
basix: v0.8.0
ufl: 2024.1.0.post0
ffcx: v0.8.0

- name: Run build-wrapper
run: |
cmake -S ./cpp -B build-mpc
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ARG PYTHON_VERSION=3.10
ENV HDF5_MPI="ON" \
HDF5_DIR="/usr/local"

RUN python3 -m pip install -U pip setuptools

# Install h5py https://github.com/h5py/h5py/issues/2222
RUN python3 -m pip install --no-cache-dir --no-binary=h5py git+https://github.com/h5py/h5py.git
RUN python3 -m pip install meshio
Expand All @@ -21,7 +23,7 @@ RUN . /usr/local/bin/dolfinx-real-mode && \
. /usr/local/dolfinx-real/lib/dolfinx/dolfinx.conf && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real -DCMAKE_BUILD_TYPE=Developer -B build-dir-real dolfinx_mpc/cpp/ && \
ninja install -j4 -C build-dir-real && \
python3 -m pip install -v --target /usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir dolfinx_mpc/python
python3 -m pip install -v --no-build-isolation --check-build-dependencies --no-dependencies --target /usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages --config-settings=cmake.build-type=Developer -e dolfinx_mpc/python/[test]

# Clean repo to remove build dir from pip
RUN rm -rf dolfinx_mpc/python/build
Expand All @@ -31,6 +33,6 @@ RUN . /usr/local/bin/dolfinx-complex-mode && \
. /usr/local/dolfinx-complex/lib/dolfinx/dolfinx.conf && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-complex -DCMAKE_BUILD_TYPE=Developer -B build-dir-complex dolfinx_mpc/cpp/ && \
ninja install -j4 -C build-dir-complex && \
python3 -m pip install -v --target /usr/local/dolfinx-complex/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir dolfinx_mpc/python
python3 -m pip install -v --no-build-isolation --check-build-dependencies --no-dependencies --target /usr/local/dolfinx-complex/lib/python${PYTHON_VERSION}/dist-packages --config-settings=cmake.build-type=Developer -e dolfinx_mpc/python/[test]

WORKDIR /root

0 comments on commit 86677c0

Please sign in to comment.