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

Simplify platypus-deps Dockerfile #60

Merged
merged 3 commits into from
Dec 6, 2024
Merged
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
71 changes: 25 additions & 46 deletions docker/platypus-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
flex \
clang-format \
clang-tidy \
cmake \
curl \
doxygen \
gfortran \
git \
graphviz \
ninja-build \
Expand All @@ -38,7 +40,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
libfreetype6-dev \
libglew-dev \
libglm-dev \
libhdf5-mpich-dev \
libhdf5-openmpi-dev \
libnetcdf-dev \
libomp-14-dev \
libpng-dev \
Expand All @@ -49,25 +51,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
rm -rf /var/lib/apt/lists/*

# Install pip packages
RUN pip install --no-cache-dir packaging && \
pip install --no-cache-dir pyyaml && \
pip install --no-cache-dir setuptools && \
pip install --no-cache-dir xmltodict && \
pip install --no-cache-dir deepdiff && \
pip install --no-cache-dir jinja2 && \
pip install --no-cache-dir livereload && \
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'
RUN pip install --no-cache-dir \
deepdiff \
jinja2 \
livereload \
packaging \
pybtex \
pylatexenc \
pyyaml \
setuptools \
xmltodict

# Download SuperLU
WORKDIR /$WORKDIR
Expand All @@ -80,7 +73,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 +95,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 @@ -120,9 +105,9 @@ WORKDIR /$WORKDIR/conduit
RUN mkdir build
WORKDIR /$WORKDIR/conduit/build
RUN cmake ../src \
-DCMAKE_INSTALL_PREFIX=/$WORKDIR/conduit/build-install \
-DCMAKE_BUILD_TYPE="Release" \
-DENABLE_MPI=YES
-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
Expand All @@ -148,7 +133,7 @@ RUN cmake .. \
-DMFEM_USE_NETCDF=YES \
-DMFEM_USE_CONDUIT=YES \
-DCONDUIT_DIR=/$WORKDIR/conduit/build-install \
-DHDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich/ && \
-DHDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ && \
make -j$compile_cores
WORKDIR /$WORKDIR/mfem/build/miniapps/common
RUN make -j$compile_cores
Expand All @@ -164,24 +149,18 @@ 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 && \
export F77=mpif77 && \
export FC=mpif90 && \
METHODS=opt ./scripts/update_and_rebuild_libmesh.sh --with-mpi && \
METHODS=opt ./scripts/update_and_rebuild_libmesh.sh && \
METHODS=opt ./scripts/update_and_rebuild_wasp.sh && \
./configure --with-derivative-size=200

# Build WASP
WORKDIR /$WORKDIR/moose/scripts
RUN METHODS=opt ./update_and_rebuild_wasp.sh

# Build MOOSE
WORKDIR /$WORKDIR/moose/framework
RUN METHOD=opt make -j$compile_cores
Expand All @@ -195,4 +174,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
Loading