Skip to content

Commit

Permalink
Simplify platypus-deps Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Nov 26, 2024
1 parent f7db162 commit 4f965bd
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions docker/platypus-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
flex \
clang-format \
clang-tidy \
cmake \
curl \
doxygen \
git \
Expand Down Expand Up @@ -59,16 +60,6 @@ RUN pip install --no-cache-dir packaging && \
pip install --no-cache-dir pybtex && \
pip install --no-cache-dir pylatexenc

# Install CMake
WORKDIR /$WORKDIR
RUN git clone https://github.com/Kitware/CMake.git
WORKDIR /$WORKDIR/CMake
RUN git checkout 78ae759 && \
./bootstrap --parallel=$compile_cores && \
make -j$compile_cores && \
make install && \
alias cmake='/$WORKDIR/CMake/bin/cmake'

# Download SuperLU
WORKDIR /$WORKDIR
RUN curl -LJO https://github.com/xiaoyeli/superlu_dist/archive/refs/tags/v8.1.0.tar.gz
Expand All @@ -80,7 +71,7 @@ WORKDIR /$WORKDIR/petsc
RUN curl -L -O http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.19.3.tar.gz && \
tar -xf petsc-3.19.3.tar.gz -C .

# Build PETSc
# Build and install PETSc
WORKDIR /$WORKDIR/petsc/petsc-3.19.3
RUN ./configure \
--prefix=/$WORKDIR/petsc \
Expand All @@ -102,16 +93,8 @@ RUN ./configure \
--download-scalapack=1 \
--download-mumps=1 \
--download-slepc=1 \
--with-64-bit-indices=1 \
PETSC_DIR="$(pwd)" PETSC_ARCH=arch-linux-c-opt && \
make

# Install PETSc
WORKDIR /$WORKDIR/petsc/petsc-3.19.3
RUN make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt install && \
make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt check
WORKDIR /$WORKDIR
RUN export PETSC_DIR=/$WORKDIR/petsc
--with-64-bit-indices=1 && \
make && make install && make check

# Download and build Conduit
WORKDIR /$WORKDIR
Expand All @@ -121,11 +104,10 @@ RUN mkdir build
WORKDIR /$WORKDIR/conduit/build
RUN cmake ../src \
-DCMAKE_INSTALL_PREFIX=/$WORKDIR/conduit/build-install \
-DCMAKE_BUILD_TYPE="Release" \
-DENABLE_MPI=YES
RUN make -j$compile_cores install

# Build MFEM and common miniapp
# Build MFEM and miniapps
WORKDIR /$WORKDIR
RUN git clone https://github.com/mfem/mfem.git
WORKDIR /$WORKDIR/mfem
Expand All @@ -134,6 +116,7 @@ WORKDIR /$WORKDIR/mfem/build
RUN cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=YES \
-DMFEM_ENABLE_MINIAPPS=YES \
-DMFEM_USE_OPENMP=NO \
-DMFEM_THREAD_SAFE=NO \
-DHYPRE_DIR=/$WORKDIR/petsc/ \
Expand All @@ -150,8 +133,6 @@ RUN cmake .. \
-DCONDUIT_DIR=/$WORKDIR/conduit/build-install \
-DHDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich/ && \
make -j$compile_cores
WORKDIR /$WORKDIR/mfem/build/miniapps/common
RUN make -j$compile_cores

# Build GLVis
WORKDIR /$WORKDIR
Expand All @@ -164,12 +145,11 @@ RUN cmake -G Ninja -DMFEM_DIR=/$WORKDIR/mfem/build .. && \

# Configure MOOSE
WORKDIR /$WORKDIR
RUN export MOOSE_JOBS=$compile_cores && \
git clone https://github.com/idaholab/moose
RUN git clone https://github.com/idaholab/moose
WORKDIR /$WORKDIR/moose
RUN git checkout master && \
export MOOSE_JOBS=$compile_cores && \
export PETSC_DIR=/$WORKDIR/petsc && \
export PETSC_ARCH=arch-linux-c-opt && \
export CC=mpicc && \
export CXX=mpicxx && \
export F90=mpif90 && \
Expand All @@ -195,4 +175,4 @@ RUN METHOD=opt make -j$compile_cores

# Build SOLID_MECHANICS module
WORKDIR /$WORKDIR/moose/modules/solid_mechanics
RUN METHOD=opt make -j$compile_cores
RUN METHOD=opt make -j$compile_cores

0 comments on commit 4f965bd

Please sign in to comment.