Skip to content

Commit

Permalink
Docker: Install CP2K from docker build context
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Feb 13, 2022
1 parent 219eac8 commit 2f1076a
Show file tree
Hide file tree
Showing 22 changed files with 532 additions and 210 deletions.
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_cuda_A100
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local_cuda.psmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local_cuda psmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local_cuda", "psmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local_cuda VERSION=psmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local_cuda' 'psmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_cuda_P100
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local_cuda.psmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local_cuda psmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local_cuda", "psmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local_cuda VERSION=psmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local_cuda' 'psmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_cuda_V100
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local_cuda.psmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local_cuda psmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local_cuda", "psmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local_cuda.psmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local_cuda VERSION=psmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local_cuda' 'psmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_fedora-psmp
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local.psmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local psmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "psmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local.psmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local VERSION=psmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local' 'psmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_gcc10
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local.ssmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local.ssmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local VERSION=ssmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local' 'ssmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_gcc7
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local.ssmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local.ssmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local VERSION=ssmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local' 'ssmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_gcc8
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local.ssmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local.ssmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local VERSION=ssmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local' 'ssmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_gcc9
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local.ssmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local.ssmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local VERSION=ssmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local' 'ssmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF
35 changes: 25 additions & 10 deletions tools/docker/Dockerfile.test_hip_cuda_A100
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,30 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install regression test for local_hip.psmp.
WORKDIR /workspace

COPY ./tools/docker/scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./tools/docker/scripts/install_regtest.sh .
RUN ./install_regtest.sh local_hip psmp

COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local_hip", "psmp"]
WORKDIR /workspace/cp2k

# Build binary in a separate layer to improve cache hit rate.
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c "mkdir -p arch \
&& ln -vs /opt/cp2k-toolchain/install/arch/local_hip.psmp ./arch/ \
&& echo 'Compiling cp2k...' \
&& if [ -n \"${GIT_COMMIT_SHA}\" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi \
&& source /opt/cp2k-toolchain/install/setup \
&& ( make -j ARCH=local_hip VERSION=psmp &> /dev/null || true )"

# Run regression tests.
ARG TESTOPTS
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN TESTOPTS="${TESTOPTS}" ./test_regtest.sh 'local_hip' 'psmp' 2>&1 | tee report.txt

# Output the report if the image was pulled from the build cache.
CMD cat $(find ./report.txt -mmin +3)

#EOF

0 comments on commit 2f1076a

Please sign in to comment.