Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add break system packages #3196

Merged
merged 3 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions docker/Dockerfile.end-user
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ ONBUILD ARG DOLFINX_CMAKE_BUILD_TYPE="Release"
ONBUILD RUN cd basix && cmake -G Ninja -DCMAKE_BUILD_TYPE=${DOLFINX_CMAKE_BUILD_TYPE} -B build-dir -S ./cpp && \
cmake --build build-dir && \
cmake --install build-dir && \
python3 -m pip install ./python && \
cd ../ufl && pip3 install --no-cache-dir . && \
cd ../ffcx && pip3 install --no-cache-dir . && \
cd ../ && pip3 install --no-cache-dir ipython
pip install --break-system-packages ./python && \
cd ../ufl && pip install --break-system-packages --no-cache-dir . && \
cd ../ffcx && pip install --break-system-packages --no-cache-dir . && \
cd ../ && pip install --break-system-packages --no-cache-dir ipython

ONBUILD RUN cd dolfinx && \
mkdir -p build-real && \
cd build-real && \
PETSC_ARCH=linux-gnu-real64-32 cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real -DCMAKE_BUILD_TYPE=${DOLFINX_CMAKE_BUILD_TYPE} ../cpp && \
ninja install && \
cd ../python && \
PETSC_ARCH=linux-gnu-real64-32 pip3 install -v \
PETSC_ARCH=linux-gnu-real64-32 pip install --break-system-packages -v \
--config-settings=cmake.build-type="${DOLFINX_CMAKE_BUILD_TYPE}" --config-settings=install.strip=false --no-build-isolation --check-build-dependencies \
--target /usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir . && \
git clean -fdx && \
Expand All @@ -99,7 +99,7 @@ ONBUILD RUN cd dolfinx && \
ninja install && \
. /usr/local/dolfinx-complex/lib/dolfinx/dolfinx.conf && \
cd ../python && \
PETSC_ARCH=linux-gnu-complex128-32 pip3 install -v \
PETSC_ARCH=linux-gnu-complex128-32 pip install --break-system-packages -v \
--config-settings=cmake.build-type="${DOLFINX_CMAKE_BUILD_TYPE}" --config-settings=install.strip=false --no-build-isolation --check-build-dependencies \
--target /usr/local/dolfinx-complex/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir .

Expand Down Expand Up @@ -148,7 +148,7 @@ ARG PYVISTA_VERSION

WORKDIR /root

RUN pip3 install --upgrade --no-cache-dir jupyter jupyterlab
RUN pip install --break-system-packages --no-cache-dir jupyter jupyterlab

# pyvista dependencies from apt
RUN apt-get -qq update && \
Expand All @@ -163,9 +163,9 @@ RUN apt-get -qq update && \
# Trame is preferred backend for pyvista
RUN dpkgArch="$(dpkg --print-architecture)"; \
case "$dpkgArch" in amd64) \
python3 -m pip install --no-cache-dir pyvista[trame]==${PYVISTA_VERSION} && \
python3 -m pip install --no-cache-dir matplotlib && \
python3 -m pip cache purge ;; \
pip install --no-cache-dir --break-system-packages pyvista[trame]==${PYVISTA_VERSION} && \
pip install --no-cache-dir --break-system-packages matplotlib && \
pip cache purge ;; \
esac;

# Jupyter Notebook kernel specification for complex build DOLFINx
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.test-env
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ RUN if [ "$MPI" = "mpich" ]; then \
# - Second set of packages are recommended and/or required to build
# documentation or run tests.
RUN pip3 install --break-system-packages --no-cache-dir --upgrade setuptools pip && \
pip3 install --break-system-packages --no-cache-dir cffi mpi4py numba numpy==${NUMPY_VERSION} scikit-build-core[pyproject] && \
pip3 install --break-system-packages --no-cache-dir cffi numba numpy==${NUMPY_VERSION} scikit-build-core[pyproject] && \
pip3 install --break-system-packages --no-cache-dir --no-build-isolation mpi4py && \
pip3 install --break-system-packages --no-cache-dir breathe clang-format cmakelang jupytext matplotlib mypy myst-parser nanobind==${NANOBIND_VERSION} pytest pytest-xdist ruff scipy sphinx sphinx_rtd_theme types-setuptools

# Install KaHIP
Expand Down Expand Up @@ -318,7 +319,7 @@ RUN apt-get -qq update && \
make PETSC_ARCH=linux-gnu-complex128-64 ${MAKEFLAGS} all && \
# Install petsc4py
cd src/binding/petsc4py && \
PETSC_ARCH=linux-gnu-real32-32:linux-gnu-complex64-32:linux-gnu-real64-32:linux-gnu-complex128-32:linux-gnu-real64-64:linux-gnu-complex128-64 pip3 install --break-system-packages --no-cache-dir -v . && \
PETSC_ARCH=linux-gnu-real32-32:linux-gnu-complex64-32:linux-gnu-real64-32:linux-gnu-complex128-32:linux-gnu-real64-64:linux-gnu-complex128-64 pip3 install --break-system-packages --no-cache-dir -v --no-build-isolation . && \
# Cleanup
apt-get -y purge bison flex && \
apt-get -y autoremove && \
Expand Down Expand Up @@ -359,7 +360,7 @@ RUN git clone -b v${SLEPC_VERSION} https://gitlab.com/slepc/slepc.git ${SLEPC_DI
make && \
# Install slepc4py
cd src/binding/slepc4py && \
PETSC_ARCH=linux-gnu-real32-32:linux-gnu-complex64-32:linux-gnu-real64-32:linux-gnu-complex128-32:linux-gnu-real64-64:linux-gnu-complex128-64 pip3 install --break-system-packages --no-cache-dir . && \
PETSC_ARCH=linux-gnu-real32-32:linux-gnu-complex64-32:linux-gnu-real64-32:linux-gnu-complex128-32:linux-gnu-real64-64:linux-gnu-complex128-64 pip3 install --break-system-packages --no-cache-dir --no-build-isolation . && \
rm -rf ${SLEPC_DIR}/CTAGS ${SLEPC_DIR}/TAGS ${SLEPC_DIR}/docs ${SLEPC_DIR}/src/ ${SLEPC_DIR}/**/obj/ ${SLEPC_DIR}/**/test/ && \
rm -rf /tmp/*

Expand Down
Loading