-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
715 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# | ||
# This file was created by generate_dockerfiles.py. | ||
# Usage: docker build -f ./Dockerfile.prod_cuda_A100 ../../ | ||
# | ||
|
||
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 | ||
|
||
# Setup CUDA environment. | ||
ENV CUDA_PATH /usr/local/cuda | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64 | ||
|
||
# Install Ubuntu packages. | ||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ | ||
gfortran \ | ||
mpich \ | ||
libmpich-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install requirements for the toolchain. | ||
WORKDIR /opt/cp2k-toolchain | ||
COPY ./tools/toolchain/install_requirements*.sh ./ | ||
RUN ./install_requirements.sh ubuntu | ||
|
||
# Install the toolchain. | ||
RUN mkdir scripts | ||
COPY ./tools/toolchain/scripts/VERSION \ | ||
./tools/toolchain/scripts/parse_if.py \ | ||
./tools/toolchain/scripts/tool_kit.sh \ | ||
./tools/toolchain/scripts/common_vars.sh \ | ||
./tools/toolchain/scripts/signal_trap.sh \ | ||
./tools/toolchain/scripts/get_openblas_arch.sh \ | ||
./scripts/ | ||
COPY ./tools/toolchain/install_cp2k_toolchain.sh . | ||
RUN ./install_cp2k_toolchain.sh \ | ||
--mpi-mode=mpich \ | ||
--enable-cuda=yes \ | ||
--gpu-ver=A100 \ | ||
--dry-run | ||
|
||
# Dry-run leaves behind config files for the followup install scripts. | ||
# This breaks up the lengthy installation into smaller docker build steps. | ||
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/ | ||
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/ | ||
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/ | ||
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/ | ||
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/ | ||
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/ | ||
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/ | ||
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/ | ||
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/ | ||
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/arch_base.tmpl \ | ||
./tools/toolchain/scripts/generate_arch_files.sh \ | ||
./scripts/ | ||
RUN ./scripts/generate_arch_files.sh && rm -rf ./build | ||
|
||
# Install CP2K using local_cuda.psmp. | ||
WORKDIR /workspace/cp2k | ||
ARG GIT_COMMIT_SHA | ||
COPY ./Makefile . | ||
COPY ./src ./src | ||
COPY ./exts ./exts | ||
COPY ./tools/build_utils ./tools/build_utils | ||
RUN /bin/bash -c " \ | ||
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \ | ||
mkdir -p arch && \ | ||
ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ && \ | ||
echo 'Compiling cp2k...' && \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
make -j ARCH=local_cuda VERSION=psmp && \ | ||
rm -rf lib obj exe/local_cuda/*_unittest.psmp" | ||
COPY ./data ./data | ||
COPY ./tests ./tests | ||
COPY ./tools/regtesting ./tools/regtesting | ||
|
||
# Run regression tests. | ||
ARG TESTOPTS | ||
RUN /bin/bash -c " \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
./tools/regtesting/do_regtest.py 'local_cuda' 'psmp' "${TESTOPTS}" |& tee regtests.log && \ | ||
rm -rf regtesting" | ||
|
||
# Setup entry point for production. | ||
COPY ./tools/docker/scripts/prod_entrypoint.sh ./ | ||
ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] | ||
CMD ["cp2k", "--help"] | ||
|
||
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# | ||
# This file was created by generate_dockerfiles.py. | ||
# Usage: docker build -f ./Dockerfile.prod_cuda_P100 ../../ | ||
# | ||
|
||
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 | ||
|
||
# Setup CUDA environment. | ||
ENV CUDA_PATH /usr/local/cuda | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64 | ||
|
||
# Install Ubuntu packages. | ||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ | ||
gfortran \ | ||
mpich \ | ||
libmpich-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install requirements for the toolchain. | ||
WORKDIR /opt/cp2k-toolchain | ||
COPY ./tools/toolchain/install_requirements*.sh ./ | ||
RUN ./install_requirements.sh ubuntu | ||
|
||
# Install the toolchain. | ||
RUN mkdir scripts | ||
COPY ./tools/toolchain/scripts/VERSION \ | ||
./tools/toolchain/scripts/parse_if.py \ | ||
./tools/toolchain/scripts/tool_kit.sh \ | ||
./tools/toolchain/scripts/common_vars.sh \ | ||
./tools/toolchain/scripts/signal_trap.sh \ | ||
./tools/toolchain/scripts/get_openblas_arch.sh \ | ||
./scripts/ | ||
COPY ./tools/toolchain/install_cp2k_toolchain.sh . | ||
RUN ./install_cp2k_toolchain.sh \ | ||
--mpi-mode=mpich \ | ||
--enable-cuda=yes \ | ||
--gpu-ver=P100 \ | ||
--dry-run | ||
|
||
# Dry-run leaves behind config files for the followup install scripts. | ||
# This breaks up the lengthy installation into smaller docker build steps. | ||
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/ | ||
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/ | ||
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/ | ||
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/ | ||
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/ | ||
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/ | ||
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/ | ||
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/ | ||
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/ | ||
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/arch_base.tmpl \ | ||
./tools/toolchain/scripts/generate_arch_files.sh \ | ||
./scripts/ | ||
RUN ./scripts/generate_arch_files.sh && rm -rf ./build | ||
|
||
# Install CP2K using local_cuda.psmp. | ||
WORKDIR /workspace/cp2k | ||
ARG GIT_COMMIT_SHA | ||
COPY ./Makefile . | ||
COPY ./src ./src | ||
COPY ./exts ./exts | ||
COPY ./tools/build_utils ./tools/build_utils | ||
RUN /bin/bash -c " \ | ||
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \ | ||
mkdir -p arch && \ | ||
ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ && \ | ||
echo 'Compiling cp2k...' && \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
make -j ARCH=local_cuda VERSION=psmp && \ | ||
rm -rf lib obj exe/local_cuda/*_unittest.psmp" | ||
COPY ./data ./data | ||
COPY ./tests ./tests | ||
COPY ./tools/regtesting ./tools/regtesting | ||
|
||
# Run regression tests. | ||
ARG TESTOPTS | ||
RUN /bin/bash -c " \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
./tools/regtesting/do_regtest.py 'local_cuda' 'psmp' "${TESTOPTS}" |& tee regtests.log && \ | ||
rm -rf regtesting" | ||
|
||
# Setup entry point for production. | ||
COPY ./tools/docker/scripts/prod_entrypoint.sh ./ | ||
ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] | ||
CMD ["cp2k", "--help"] | ||
|
||
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# | ||
# This file was created by generate_dockerfiles.py. | ||
# Usage: docker build -f ./Dockerfile.prod_cuda_V100 ../../ | ||
# | ||
|
||
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 | ||
|
||
# Setup CUDA environment. | ||
ENV CUDA_PATH /usr/local/cuda | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64 | ||
|
||
# Install Ubuntu packages. | ||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ | ||
gfortran \ | ||
mpich \ | ||
libmpich-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install requirements for the toolchain. | ||
WORKDIR /opt/cp2k-toolchain | ||
COPY ./tools/toolchain/install_requirements*.sh ./ | ||
RUN ./install_requirements.sh ubuntu | ||
|
||
# Install the toolchain. | ||
RUN mkdir scripts | ||
COPY ./tools/toolchain/scripts/VERSION \ | ||
./tools/toolchain/scripts/parse_if.py \ | ||
./tools/toolchain/scripts/tool_kit.sh \ | ||
./tools/toolchain/scripts/common_vars.sh \ | ||
./tools/toolchain/scripts/signal_trap.sh \ | ||
./tools/toolchain/scripts/get_openblas_arch.sh \ | ||
./scripts/ | ||
COPY ./tools/toolchain/install_cp2k_toolchain.sh . | ||
RUN ./install_cp2k_toolchain.sh \ | ||
--mpi-mode=mpich \ | ||
--enable-cuda=yes \ | ||
--gpu-ver=V100 \ | ||
--dry-run | ||
|
||
# Dry-run leaves behind config files for the followup install scripts. | ||
# This breaks up the lengthy installation into smaller docker build steps. | ||
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/ | ||
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/ | ||
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/ | ||
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/ | ||
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/ | ||
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/ | ||
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/ | ||
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/ | ||
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/ | ||
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build | ||
|
||
COPY ./tools/toolchain/scripts/arch_base.tmpl \ | ||
./tools/toolchain/scripts/generate_arch_files.sh \ | ||
./scripts/ | ||
RUN ./scripts/generate_arch_files.sh && rm -rf ./build | ||
|
||
# Install CP2K using local_cuda.psmp. | ||
WORKDIR /workspace/cp2k | ||
ARG GIT_COMMIT_SHA | ||
COPY ./Makefile . | ||
COPY ./src ./src | ||
COPY ./exts ./exts | ||
COPY ./tools/build_utils ./tools/build_utils | ||
RUN /bin/bash -c " \ | ||
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \ | ||
mkdir -p arch && \ | ||
ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ && \ | ||
echo 'Compiling cp2k...' && \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
make -j ARCH=local_cuda VERSION=psmp && \ | ||
rm -rf lib obj exe/local_cuda/*_unittest.psmp" | ||
COPY ./data ./data | ||
COPY ./tests ./tests | ||
COPY ./tools/regtesting ./tools/regtesting | ||
|
||
# Run regression tests. | ||
ARG TESTOPTS | ||
RUN /bin/bash -c " \ | ||
source /opt/cp2k-toolchain/install/setup && \ | ||
./tools/regtesting/do_regtest.py 'local_cuda' 'psmp' "${TESTOPTS}" |& tee regtests.log && \ | ||
rm -rf regtesting" | ||
|
||
# Setup entry point for production. | ||
COPY ./tools/docker/scripts/prod_entrypoint.sh ./ | ||
ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] | ||
CMD ["cp2k", "--help"] | ||
|
||
#EOF |
Oops, something went wrong.