added multi stages option

This commit is contained in:
Jonathan Shimwell 2022-06-28 16:06:17 +01:00
parent d7a456155f
commit 3d0b404b7a

View file

@ -15,7 +15,7 @@
# sudo docker run image_name:tag_name or ID with no tag sudo docker run ID number
FROM debian:bullseye-slim
FROM debian:bullseye-slim AS dependencies
# By default this Dockerfile builds OpenMC without DAGMC and LIBMESH support
ARG build_dagmc=off
@ -172,6 +172,8 @@ RUN if [ "$build_libmesh" = "on" ]; then \
&& rm -rf ${LIBMESH_INSTALL_DIR}/build ${LIBMESH_INSTALL_DIR}/libmesh ; \
fi
FROM dependencies as build
# clone and install openmc
RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \
&& git clone --shallow-submodules --recurse-submodules --single-branch -b ${openmc_branch} --depth=1 ${OPENMC_REPO} \
@ -207,5 +209,7 @@ RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \
&& cd ../openmc && pip install .[test,depletion-mpi] \
&& python -c "import openmc"
FROM build as release
# Download cross sections (NNDC and WMP) and ENDF data needed by test suite
RUN ${HOME}/OpenMC/openmc/tools/ci/download-xs.sh