Skip to content

Commit

Permalink
Bump dependency version in Dockerfiles (#3394)
Browse files Browse the repository at this point in the history
* Version bumps in Dockerfile

* Fix cython install

* Revert HDF5 version bump

* Format fixes

* HDF5 filename updates

* Fix HDF5 tarball names

* More HDF5 updates
  • Loading branch information
garth-wells committed Sep 13, 2024
1 parent df6dc7b commit 7bb01ad
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pyvista.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
# For pyvista/pyvistaqt
DISPLAY: ":99.0"
PYVISTA_OFF_SCREEN: true
PYVISTA_QT_VERSION: 0.11.0
PYVISTA_VERSION: 0.43.10
PYVISTA_QT_VERSION: 0.11.1
PYVISTA_VERSION: 0.44.1
QT_DEBUG_PLUGINS: 1

PETSC_ARCH: ${{ matrix.petsc_arch }}
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.end-user
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# echo "FROM dolfinx/dolfinx-onbuild:nightly" | docker build -f- .
#

ARG PYVISTA_VERSION=0.43.8
ARG PYVISTA_VERSION=0.44.1

# Used to set the correct PYTHONPATH for the real and complex install of
# DOLFINx
Expand Down Expand Up @@ -170,7 +170,7 @@ RUN dpkgArch="$(dpkg --print-architecture)"; \
pip install --no-cache-dir pyvista[trame]==${PYVISTA_VERSION} ;; \
esac; \
case "$dpkgArch" in arm64) \
pip install --no-cache-dir https://github.com/finsberg/vtk-aarch64/releases/download/vtk-9.3.0-cp312/vtk-9.3.0.dev0-cp312-cp312-linux_aarch64.whl && \
pip install --no-cache-dir https://github.com/finsberg/vtk-aarch64/releases/download/vtk-9.3.0-cp312/vtk-9.3.0.dev0-cp312-cp312-linux_aarch64.whl && \
pip install --no-cache-dir pyvista[trame]==${PYVISTA_VERSION} ;; \
esac; \
pip cache purge
Expand Down
12 changes: 5 additions & 7 deletions docker/Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ FROM rockylinux/rockylinux:9

ARG BUILD_NP=4

ARG HDF5_SERIES=1.14
ARG HDF5_PATCH=3
ARG HDF5_FIX=
ARG PETSC_VERSION=3.21.3
ARG HDF5_VERSION=1.14.4.3
ARG PETSC_VERSION=3.21.5
ARG MPICH_VERSION=4.2.2

WORKDIR /tmp
Expand Down Expand Up @@ -54,9 +52,9 @@ RUN curl -L -O https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${M
rm -rf /tmp/*

# Build HDF5
RUN curl -L -O https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_SERIES}/hdf5-${HDF5_SERIES}.${HDF5_PATCH}/src/hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX}.tar.gz && \
tar -xf hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX}.tar.gz && \
cd hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX} && \
RUN curl -L -O https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz && \
tar -xf hdf5_${HDF5_VERSION}.tar.gz && \
cd hdf5-hdf5_${HDF5_VERSION} && \
./configure --prefix=/usr/local --enable-parallel --enable-shared --enable-static=no && \
make -j${BUILD_NP} install && \
rm -rf /tmp/*
Expand Down
26 changes: 9 additions & 17 deletions docker/Dockerfile.test-env
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
#

ARG ADIOS2_VERSION=2.10.1
ARG DOXYGEN_VERSION=1_11_0
ARG DOXYGEN_VERSION=1_12_0
ARG GMSH_VERSION=4_13_1
ARG HDF5_SERIES=1.14
ARG HDF5_PATCH=3
ARG HDF5_FIX=
ARG HDF5_VERSION=1.14.4.3
ARG KAHIP_VERSION=3.16
ARG NUMPY_VERSION=1.26.4
ARG PETSC_VERSION=3.21.3
ARG NUMPY_VERSION=2.1.1
ARG PETSC_VERSION=3.21.5
ARG SLEPC_VERSION=3.21.1

ARG MPICH_VERSION=4.2.2
Expand All @@ -35,9 +33,7 @@ LABEL description="FEniCS testing and development environment with PETSc real, c

ARG DOXYGEN_VERSION
ARG GMSH_VERSION
ARG HDF5_SERIES
ARG HDF5_PATCH
ARG HDF5_FIX
ARG HDF5_VERSION
ARG PETSC_VERSION
ARG SLEPC_VERSION
ARG ADIOS2_VERSION
Expand Down Expand Up @@ -149,7 +145,7 @@ RUN python3 -m venv ${VIRTUAL_ENV}

# Install Python packages (via pip)
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir numpy==${NUMPY_VERSION} && \
pip install --no-cache-dir cython numpy==${NUMPY_VERSION} && \
pip install --no-cache-dir --no-build-isolation mpi4py

# Install KaHIP
Expand All @@ -165,9 +161,9 @@ RUN wget -nc --quiet https://github.com/kahip/kahip/archive/v${KAHIP_VERSION}.ta
# HDF5 overrides CMAKE_INSTALL_PREFIX by default, hence it is set
# below to ensure that HDF5 is installed into a path where it can be
# found.
RUN wget -nc --quiet https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_SERIES}/hdf5-${HDF5_SERIES}.${HDF5_PATCH}/src/hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX}.tar.gz && \
tar xfz hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX}.tar.gz && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_PARALLEL=on -DHDF5_ENABLE_Z_LIB_SUPPORT=on -B build-dir -S hdf5-${HDF5_SERIES}.${HDF5_PATCH}${HDF5_FIX} && \
RUN wget -nc --quiet https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz && \
tar xfz hdf5_${HDF5_VERSION}.tar.gz && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_PARALLEL=on -DHDF5_ENABLE_Z_LIB_SUPPORT=on -B build-dir -S hdf5-hdf5_${HDF5_VERSION} && \
cmake --build build-dir && \
cmake --install build-dir && \
rm -rf /tmp/*
Expand Down Expand Up @@ -316,9 +312,7 @@ RUN apt-get -qq update && \
make PETSC_ARCH=linux-gnu-complex128-64 ${MAKEFLAGS} all && \
# Install petsc4py
cd src/binding/petsc4py && \
pip install --no-cache-dir cython && \
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 pip -v install --no-cache-dir --no-build-isolation . && \
pip3 uninstall --yes cython && \
# Cleanup
apt-get -y purge bison flex && \
apt-get -y autoremove && \
Expand Down Expand Up @@ -359,9 +353,7 @@ RUN git clone --depth=1 -b v${SLEPC_VERSION} https://gitlab.com/slepc/slepc.git
make && \
# Install slepc4py
cd src/binding/slepc4py && \
pip3 install --no-cache-dir cython && \
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 pip -v install --no-cache-dir --no-build-isolation . && \
pip3 uninstall --yes cython && \
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
2 changes: 1 addition & 1 deletion python/dolfinx/wrappers/la.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void declare_objects(nb::module_& m, const std::string& type)
std::size_t nrows = self.num_all_rows() * bs[0];
std::size_t ncols = self.index_map(1)->size_global() * bs[1];
auto dense = self.to_dense();
assert(nrows*ncols == dense.size());
assert(nrows * ncols == dense.size());
return dolfinx_wrappers::as_nbarray(std::move(self.to_dense()),
{nrows, ncols});
})
Expand Down
5 changes: 3 additions & 2 deletions python/dolfinx/wrappers/refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ void export_refinement_with_variable_mesh_type(nb::module_& m)
[](const dolfinx::mesh::Mesh<T>& mesh, bool redistribute,
dolfinx::mesh::GhostMode ghost_mode)
{
auto [mesh_refined, parent_cells] = dolfinx::refinement::refine_interval(
mesh, std::nullopt, redistribute, ghost_mode);
auto [mesh_refined, parent_cells]
= dolfinx::refinement::refine_interval(mesh, std::nullopt,
redistribute, ghost_mode);
return std::tuple(std::move(mesh_refined),
as_nbarray(std::move(parent_cells)));
},
Expand Down

0 comments on commit 7bb01ad

Please sign in to comment.