Skip to content

Commit

Permalink
Merge branch 'main' into dokken/update-graph-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
garth-wells committed Jul 26, 2022
2 parents ece9688 + 26a9baa commit 13f9ac0
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,24 @@
#


ARG ADIOS2_VERSION=2.8.1
ARG ADIOS2_VERSION=2.8.2
ARG GMSH_VERSION=4_10_1
ARG HDF5_SERIES=1.12
ARG HDF5_PATCH=2
ARG KAHIP_VERSION=3.14
ARG NUMPY_VERSION=1.22.4
ARG PYBIND11_VERSION=2.9.2
ARG PETSC_VERSION=3.17.2
ARG PYBIND11_VERSION=2.10.0
ARG PETSC_VERSION=3.17.3
ARG SLEPC_VERSION=3.17.1
ARG PYVISTA_VERSION=0.34.2
ARG PYVISTA_VERSION=0.35.2
ARG XTENSOR_VERSION=0.24.2
ARG XTL_VERSION=0.7.4

ARG MPICH_VERSION=4.0.2
ARG OPENMPI_SERIES=4.1
ARG OPENMPI_PATCH=4
# Used to set the correct PYTHONPATH for the real and complex install of DOLFINx
# Used to set the correct PYTHONPATH for the real and complex install of
# DOLFINx
ARG PYTHON_VERSION=3.10

########################################
Expand Down Expand Up @@ -86,17 +87,16 @@ ARG OPENMPI_PATCH
# They are safe defaults. They can be overridden by the user.
# Compiler optimisation flags for SLEPc and PETSc, all languages.
ARG PETSC_SLEPC_OPTFLAGS="-O2"
# PETSc and SLEPc number of make processes (--with-make-np)
ARG PETSC_SLEPC_MAKE_NP=2
# Turn on PETSc and SLEPc debugging. "yes" or "no".
ARG PETSC_SLEPC_DEBUGGING="no"

# MPI variant. "mpich" or "openmpi".
ARG MPI="mpich"
ARG MPICH_CONFIGURE_OPTIONS="FCFLAGS=-fallow-argument-mismatch FFLAGS=-fallow-argument-mismatch --with-device=ch4:ofi" # See https://github.com/pmodels/mpich/issues/5811
# See https://github.com/pmodels/mpich/issues/5811
ARG MPICH_CONFIGURE_OPTIONS="FCFLAGS=-fallow-argument-mismatch FFLAGS=-fallow-argument-mismatch --with-device=ch4:ofi"

# Number of build threads to use with make
ARG BUILD_NP=2
ARG BUILD_NP=3

WORKDIR /tmp

Expand Down Expand Up @@ -200,12 +200,20 @@ RUN wget -nc --quiet https://github.com/kahip/kahip/archive/v${KAHIP_VERSION}.ta
rm -rf /tmp/*

# Install HDF5
# Note: HDF5 overides CMAKE_INSTALL_PREFIX by default, hence it is set
# 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}.tar.gz && \
# tar xfz hdf5-${HDF5_SERIES}.${HDF5_PATCH}.tar.gz && \
# cd hdf5-${HDF5_SERIES}.${HDF5_PATCH} && \
# ./configure --prefix=/usr/local --enable-parallel --enable-shared --enable-static=no && \
# make -j${BUILD_NP} install && \
# rm -rf /tmp/*

# Note: HDF5 CMake install has numerous bugs and inconsistencies. Test carefully.
# HDF5 overides 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}.tar.gz && \
tar xfz hdf5-${HDF5_SERIES}.${HDF5_PATCH}.tar.gz && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -HDF5_ENABLE_PARALLEL=on -B build-dir -S hdf5-${HDF5_SERIES}.${HDF5_PATCH} && \
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_PARALLEL=on -B build-dir -S hdf5-${HDF5_SERIES}.${HDF5_PATCH} && \
cmake --build build-dir && \
cmake --install build-dir && \
rm -rf /tmp/*
Expand Down Expand Up @@ -242,7 +250,6 @@ RUN apt-get -qq update && \
--COPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--CXXOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--FOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--with-make-np=${PETSC_SLEPC_MAKE_NP} \
--with-64-bit-indices=no \
--with-debugging=${PETSC_SLEPC_DEBUGGING} \
--with-fortran-bindings=no \
Expand All @@ -264,7 +271,6 @@ RUN apt-get -qq update && \
--COPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--CXXOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--FOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--with-make-np=${PETSC_SLEPC_MAKE_NP} \
--with-64-bit-indices=no \
--with-debugging=${PETSC_SLEPC_DEBUGGING} \
--with-fortran-bindings=no \
Expand All @@ -285,7 +291,6 @@ RUN apt-get -qq update && \
--COPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--CXXOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--FOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--with-make-np=${PETSC_SLEPC_MAKE_NP} \
--with-64-bit-indices=yes \
--with-debugging=${PETSC_SLEPC_DEBUGGING} \
--with-fortran-bindings=no \
Expand All @@ -304,7 +309,6 @@ RUN apt-get -qq update && \
--COPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--CXXOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--FOPTFLAGS="${PETSC_SLEPC_OPTFLAGS}" \
--with-make-np=${PETSC_SLEPC_MAKE_NP} \
--with-64-bit-indices=yes \
--with-debugging=${PETSC_SLEPC_DEBUGGING} \
--with-fortran-bindings=no \
Expand Down Expand Up @@ -474,8 +478,10 @@ RUN apt-get -qq update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# pyvista dependencies from pip. Only compatible with x86-64 (amd64).
# matplotlib improves plotting quality with better color maps and properly rendering colorbars.
# Install pyvista from PyPI. pyvisa depends on (py)vtk), but vtk is not
# available on pypi for linux/arm64.
# matplotlib improves plotting quality with better color maps and
# properly rendering colorbars.
RUN dpkgArch="$(dpkg --print-architecture)"; \
case "$dpkgArch" in amd64) \
pip3 install --no-cache-dir pyvista==${PYVISTA_VERSION} ;; \
Expand Down

0 comments on commit 13f9ac0

Please sign in to comment.