diff --git a/tools/docker/Dockerfile.prod_cuda_A100 b/tools/docker/Dockerfile.prod_cuda_A100 index fc2cf46772..1e24ab94f0 100644 --- a/tools/docker/Dockerfile.prod_cuda_A100 +++ b/tools/docker/Dockerfile.prod_cuda_A100 @@ -85,7 +85,7 @@ RUN /bin/bash -c " \ 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" + rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -99,7 +99,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local_cuda", "psmp"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_cuda_P100 b/tools/docker/Dockerfile.prod_cuda_P100 index 9a01eabd98..6668c7338f 100644 --- a/tools/docker/Dockerfile.prod_cuda_P100 +++ b/tools/docker/Dockerfile.prod_cuda_P100 @@ -85,7 +85,7 @@ RUN /bin/bash -c " \ 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" + rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -99,7 +99,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local_cuda", "psmp"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_cuda_V100 b/tools/docker/Dockerfile.prod_cuda_V100 index 85b88724c6..957d96abd3 100644 --- a/tools/docker/Dockerfile.prod_cuda_V100 +++ b/tools/docker/Dockerfile.prod_cuda_V100 @@ -85,7 +85,7 @@ RUN /bin/bash -c " \ 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" + rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -99,7 +99,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local_cuda", "psmp"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local_cuda", "psmp"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_pdbg b/tools/docker/Dockerfile.prod_pdbg index 3145df013b..60760a8288 100644 --- a/tools/docker/Dockerfile.prod_pdbg +++ b/tools/docker/Dockerfile.prod_pdbg @@ -73,7 +73,7 @@ RUN /bin/bash -c " \ echo 'Compiling cp2k...' && \ source /opt/cp2k-toolchain/install/setup && \ make -j ARCH=local VERSION=pdbg && \ - rm -rf lib obj exe/local/*_unittest.pdbg" + rm -rf lib obj exe/local/libcp2k_unittest.pdbg" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -87,7 +87,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local", "pdbg"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local", "pdbg"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_psmp b/tools/docker/Dockerfile.prod_psmp index dd82ec8903..7a96fedaec 100644 --- a/tools/docker/Dockerfile.prod_psmp +++ b/tools/docker/Dockerfile.prod_psmp @@ -73,7 +73,7 @@ RUN /bin/bash -c " \ echo 'Compiling cp2k...' && \ source /opt/cp2k-toolchain/install/setup && \ make -j ARCH=local VERSION=psmp && \ - rm -rf lib obj exe/local/*_unittest.psmp" + rm -rf lib obj exe/local/libcp2k_unittest.psmp" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -87,7 +87,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local", "psmp"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local", "psmp"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_sdbg b/tools/docker/Dockerfile.prod_sdbg index fe1a802a25..b1df8bdf22 100644 --- a/tools/docker/Dockerfile.prod_sdbg +++ b/tools/docker/Dockerfile.prod_sdbg @@ -73,7 +73,7 @@ RUN /bin/bash -c " \ echo 'Compiling cp2k...' && \ source /opt/cp2k-toolchain/install/setup && \ make -j ARCH=local VERSION=sdbg && \ - rm -rf lib obj exe/local/*_unittest.sdbg" + rm -rf lib obj exe/local/libcp2k_unittest.sdbg" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -87,7 +87,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local", "sdbg"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local", "sdbg"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.prod_ssmp b/tools/docker/Dockerfile.prod_ssmp index c9944a6748..a52c70befe 100644 --- a/tools/docker/Dockerfile.prod_ssmp +++ b/tools/docker/Dockerfile.prod_ssmp @@ -73,7 +73,7 @@ RUN /bin/bash -c " \ echo 'Compiling cp2k...' && \ source /opt/cp2k-toolchain/install/setup && \ make -j ARCH=local VERSION=ssmp && \ - rm -rf lib obj exe/local/*_unittest.ssmp" + rm -rf lib obj exe/local/libcp2k_unittest.ssmp" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -87,7 +87,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "local", "ssmp"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "local", "ssmp"] CMD ["cp2k", "--help"] #EOF diff --git a/tools/docker/Dockerfile.test_aiida b/tools/docker/Dockerfile.test_aiida index aee914accd..9456bb0026 100644 --- a/tools/docker/Dockerfile.test_aiida +++ b/tools/docker/Dockerfile.test_aiida @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_aiida.sh . RUN ./test_aiida.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_ase b/tools/docker/Dockerfile.test_ase index cb059faebf..69d39cc8e7 100644 --- a/tools/docker/Dockerfile.test_ase +++ b/tools/docker/Dockerfile.test_ase @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_ase.sh . RUN ./test_ase.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_conventions b/tools/docker/Dockerfile.test_conventions index 794c5f1db8..cc778d532a 100644 --- a/tools/docker/Dockerfile.test_conventions +++ b/tools/docker/Dockerfile.test_conventions @@ -84,6 +84,6 @@ RUN /bin/bash -ec " \ ./test_conventions.sh |& tee report.log" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_coverage-pdbg b/tools/docker/Dockerfile.test_coverage-pdbg index 98077d94f7..f6797900d9 100644 --- a/tools/docker/Dockerfile.test_coverage-pdbg +++ b/tools/docker/Dockerfile.test_coverage-pdbg @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_coverage.sh . RUN ./test_coverage.sh "pdbg" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_coverage-sdbg b/tools/docker/Dockerfile.test_coverage-sdbg index 34a16f1a6f..e5fd0ce329 100644 --- a/tools/docker/Dockerfile.test_coverage-sdbg +++ b/tools/docker/Dockerfile.test_coverage-sdbg @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_coverage.sh . RUN ./test_coverage.sh "sdbg" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_cuda_A100 b/tools/docker/Dockerfile.test_cuda_A100 index a6fe080501..fe2a62547a 100644 --- a/tools/docker/Dockerfile.test_cuda_A100 +++ b/tools/docker/Dockerfile.test_cuda_A100 @@ -96,6 +96,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_cuda_P100 b/tools/docker/Dockerfile.test_cuda_P100 index f2f45d35fc..a5c026cf6f 100644 --- a/tools/docker/Dockerfile.test_cuda_P100 +++ b/tools/docker/Dockerfile.test_cuda_P100 @@ -96,6 +96,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_cuda_V100 b/tools/docker/Dockerfile.test_cuda_V100 index eb4bfd73c9..7c910c7120 100644 --- a/tools/docker/Dockerfile.test_cuda_V100 +++ b/tools/docker/Dockerfile.test_cuda_V100 @@ -96,6 +96,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_doxygen b/tools/docker/Dockerfile.test_doxygen index 41020ede78..b3d58b0b25 100644 --- a/tools/docker/Dockerfile.test_doxygen +++ b/tools/docker/Dockerfile.test_doxygen @@ -24,6 +24,6 @@ COPY ./tools/docker/scripts/test_doxygen.sh . RUN ./test_doxygen.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_fedora-psmp b/tools/docker/Dockerfile.test_fedora-psmp index b4765c5268..72f55680fa 100644 --- a/tools/docker/Dockerfile.test_fedora-psmp +++ b/tools/docker/Dockerfile.test_fedora-psmp @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_gcc10 b/tools/docker/Dockerfile.test_gcc10 index a6d97e472a..6f2ea8d090 100644 --- a/tools/docker/Dockerfile.test_gcc10 +++ b/tools/docker/Dockerfile.test_gcc10 @@ -110,6 +110,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_gcc7 b/tools/docker/Dockerfile.test_gcc7 index f37985896f..2b553a95e3 100644 --- a/tools/docker/Dockerfile.test_gcc7 +++ b/tools/docker/Dockerfile.test_gcc7 @@ -110,6 +110,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_gcc8 b/tools/docker/Dockerfile.test_gcc8 index caa6373feb..49a45d5693 100644 --- a/tools/docker/Dockerfile.test_gcc8 +++ b/tools/docker/Dockerfile.test_gcc8 @@ -110,6 +110,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_gcc9 b/tools/docker/Dockerfile.test_gcc9 index fc2d21e12b..a506488683 100644 --- a/tools/docker/Dockerfile.test_gcc9 +++ b/tools/docker/Dockerfile.test_gcc9 @@ -110,6 +110,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_gromacs b/tools/docker/Dockerfile.test_gromacs index b1d853ff57..4494b1e92d 100644 --- a/tools/docker/Dockerfile.test_gromacs +++ b/tools/docker/Dockerfile.test_gromacs @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_gromacs.sh . RUN ./test_gromacs.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_hip_cuda_A100 b/tools/docker/Dockerfile.test_hip_cuda_A100 index 9f0ae7c23d..afaf7f5bf4 100644 --- a/tools/docker/Dockerfile.test_hip_cuda_A100 +++ b/tools/docker/Dockerfile.test_hip_cuda_A100 @@ -174,6 +174,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_hip_cuda_P100 b/tools/docker/Dockerfile.test_hip_cuda_P100 index 354ef84eaf..7b2ceb0fa8 100644 --- a/tools/docker/Dockerfile.test_hip_cuda_P100 +++ b/tools/docker/Dockerfile.test_hip_cuda_P100 @@ -174,6 +174,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_hip_cuda_V100 b/tools/docker/Dockerfile.test_hip_cuda_V100 index a950c45d12..dfeb4f44fb 100644 --- a/tools/docker/Dockerfile.test_hip_cuda_V100 +++ b/tools/docker/Dockerfile.test_hip_cuda_V100 @@ -174,6 +174,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_hip_rocm_Mi100 b/tools/docker/Dockerfile.test_hip_rocm_Mi100 index 9d3dee088b..c5fa1f25e8 100644 --- a/tools/docker/Dockerfile.test_hip_rocm_Mi100 +++ b/tools/docker/Dockerfile.test_hip_rocm_Mi100 @@ -100,6 +100,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_hip_rocm_Mi50 b/tools/docker/Dockerfile.test_hip_rocm_Mi50 index 151735fb44..bebbd111d4 100644 --- a/tools/docker/Dockerfile.test_hip_rocm_Mi50 +++ b/tools/docker/Dockerfile.test_hip_rocm_Mi50 @@ -100,6 +100,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_i-pi b/tools/docker/Dockerfile.test_i-pi index 984c0ae0bf..1ba755e201 100644 --- a/tools/docker/Dockerfile.test_i-pi +++ b/tools/docker/Dockerfile.test_i-pi @@ -80,6 +80,6 @@ COPY ./tools/docker/scripts/test_i-pi.sh . RUN ./test_i-pi.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_i386 b/tools/docker/Dockerfile.test_i386 index edfc00c27c..6414a2d983 100644 --- a/tools/docker/Dockerfile.test_i386 +++ b/tools/docker/Dockerfile.test_i386 @@ -110,6 +110,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_manual b/tools/docker/Dockerfile.test_manual index 37e53d54c0..531b2dcc69 100644 --- a/tools/docker/Dockerfile.test_manual +++ b/tools/docker/Dockerfile.test_manual @@ -72,8 +72,7 @@ RUN /bin/bash -c " \ ln -vs /opt/cp2k-toolchain/install/arch/local.psmp ./arch/ && \ echo 'Compiling cp2k...' && \ source /opt/cp2k-toolchain/install/setup && \ - make -j ARCH=local VERSION=psmp && \ - rm -rf lib obj exe/local/*_unittest.psmp" + ( make -j ARCH=local VERSION=psmp &> /dev/null || true )" COPY ./data ./data COPY ./tests ./tests COPY ./tools/regtesting ./tools/regtesting @@ -85,6 +84,6 @@ COPY ./tools/docker/scripts/test_manual.sh . RUN ./test_manual.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_minimal b/tools/docker/Dockerfile.test_minimal index 5f163b8eb6..d78f934f79 100644 --- a/tools/docker/Dockerfile.test_minimal +++ b/tools/docker/Dockerfile.test_minimal @@ -83,6 +83,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_openmpi-psmp b/tools/docker/Dockerfile.test_openmpi-psmp index 9f8e6a0249..c3bbc914df 100644 --- a/tools/docker/Dockerfile.test_openmpi-psmp +++ b/tools/docker/Dockerfile.test_openmpi-psmp @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_pdbg b/tools/docker/Dockerfile.test_pdbg index ce69ba8c98..626d8b43e9 100644 --- a/tools/docker/Dockerfile.test_pdbg +++ b/tools/docker/Dockerfile.test_pdbg @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_performance b/tools/docker/Dockerfile.test_performance index 87fbe11c86..3769b3ffbf 100644 --- a/tools/docker/Dockerfile.test_performance +++ b/tools/docker/Dockerfile.test_performance @@ -83,6 +83,6 @@ COPY ./tools/docker/scripts/test_performance.sh \ RUN ./test_performance.sh "local" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_performance_cuda_A100 b/tools/docker/Dockerfile.test_performance_cuda_A100 index 07b8431b0e..b92ade2c0f 100644 --- a/tools/docker/Dockerfile.test_performance_cuda_A100 +++ b/tools/docker/Dockerfile.test_performance_cuda_A100 @@ -95,6 +95,6 @@ COPY ./tools/docker/scripts/test_performance.sh \ RUN ./test_performance.sh "local_cuda" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_performance_cuda_P100 b/tools/docker/Dockerfile.test_performance_cuda_P100 index dc2f4d5c37..062420bc15 100644 --- a/tools/docker/Dockerfile.test_performance_cuda_P100 +++ b/tools/docker/Dockerfile.test_performance_cuda_P100 @@ -95,6 +95,6 @@ COPY ./tools/docker/scripts/test_performance.sh \ RUN ./test_performance.sh "local_cuda" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_performance_cuda_V100 b/tools/docker/Dockerfile.test_performance_cuda_V100 index ac912ded70..e3b96c9097 100644 --- a/tools/docker/Dockerfile.test_performance_cuda_V100 +++ b/tools/docker/Dockerfile.test_performance_cuda_V100 @@ -95,6 +95,6 @@ COPY ./tools/docker/scripts/test_performance.sh \ RUN ./test_performance.sh "local_cuda" 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_psmp b/tools/docker/Dockerfile.test_psmp index 4648387520..af0799bb91 100644 --- a/tools/docker/Dockerfile.test_psmp +++ b/tools/docker/Dockerfile.test_psmp @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_python b/tools/docker/Dockerfile.test_python index 287a841890..96e721fc3d 100644 --- a/tools/docker/Dockerfile.test_python +++ b/tools/docker/Dockerfile.test_python @@ -24,6 +24,6 @@ COPY ./tools/docker/scripts/test_python.sh . RUN ./test_python.sh 2>&1 | tee report.log # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_sdbg b/tools/docker/Dockerfile.test_sdbg index 23c3dde04c..3dd2038aea 100644 --- a/tools/docker/Dockerfile.test_sdbg +++ b/tools/docker/Dockerfile.test_sdbg @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/Dockerfile.test_ssmp b/tools/docker/Dockerfile.test_ssmp index 526635785d..14310d91e9 100644 --- a/tools/docker/Dockerfile.test_ssmp +++ b/tools/docker/Dockerfile.test_ssmp @@ -84,6 +84,6 @@ RUN /bin/bash -c " \ rm -rf regtesting" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF diff --git a/tools/docker/README.md b/tools/docker/README.md new file mode 100644 index 0000000000..8e7b0f27e6 --- /dev/null +++ b/tools/docker/README.md @@ -0,0 +1,45 @@ +# Docker Containers + +This directory hosts docker files for testing and running cp2k. +The only prerequisite is to [install Docker](https://docs.docker.com/get-docker/). + +## Production Images + + 1. Build the container image: + + + ```shell + docker build -f Dockerfile.prod_psmp --build-arg GIT_COMMIT_SHA=$(git rev-parse HEAD) -t cp2k_prod_psmp ../../ + ``` + + + 2. Goto the directory with your input files: + + ```shell + cd ../../benchmarks/QS_single_node + ``` + + 3. Run the container: + + + ```shell + docker run -ti -v "$(pwd)":/mnt cp2k_prod_psmp mpiexec -genv OMP_NUM_THREADS=2 -np 16 cp2k dbcsr.inp + ``` + + +## Test Images + +The `Dockerfile.test_*` file are used by the [cp2k-ci](github.com/cp2k/cp2k-ci) +to check pull requests. and populate the [dashboard](http:s//dashboard.cp2k.org). + +Building a test image executes the test: + +```shell +docker build -f Dockerfile.test_sdbg -t cp2k_test_sdbg ../../ +``` + +To retrieve the cached report of an old image simply run it: + +```shell +docker run cp2k_test_sdbg +``` diff --git a/tools/docker/generate_dockerfiles.py b/tools/docker/generate_dockerfiles.py index 6bcf661daf..71a2cbb09b 100755 --- a/tools/docker/generate_dockerfiles.py +++ b/tools/docker/generate_dockerfiles.py @@ -78,7 +78,7 @@ def main() -> None: # ====================================================================================== def regtest(version: str, arch: str = "local") -> str: return ( - install_cp2k(version=version, arch=arch, prod=False) + install_cp2k(version=version, arch=arch) + fr""" # Run regression tests. ARG TESTOPTS @@ -95,7 +95,7 @@ RUN /bin/bash -c " \ # ====================================================================================== def performance(arch: str = "local") -> str: return ( - install_cp2k(version="psmp", arch=arch, prod=False) + install_cp2k(version="psmp", arch=arch) + fr""" # Run performance test for {arch}. COPY ./benchmarks ./benchmarks @@ -111,7 +111,7 @@ RUN ./test_performance.sh "{arch}" 2>&1 | tee report.log # ====================================================================================== def coverage(version: str) -> str: return ( - install_cp2k(version=version, arch="local_coverage", prod=False) + install_cp2k(version=version, arch="local_coverage") + fr""" # Run coverage test for {version}. COPY ./tools/docker/scripts/test_coverage.sh . @@ -124,7 +124,7 @@ RUN ./test_coverage.sh "{version}" 2>&1 | tee report.log # ====================================================================================== def conventions() -> str: return ( - install_cp2k(version="psmp", arch="local_warn", prod=False) + install_cp2k(version="psmp", arch="local_warn") + fr""" # Run test for conventions. COPY ./arch/Linux-x86-64-gfortran.dumpast ./arch/ @@ -141,7 +141,7 @@ RUN /bin/bash -ec " \ # ====================================================================================== def manual() -> str: return ( - install_cp2k(version="psmp", arch="local", prod=True) # prod has REVISION set + install_cp2k(version="psmp", arch="local", revision=True) + fr""" # Generate manual. COPY ./tools/manual ./tools/manual @@ -156,7 +156,7 @@ RUN ./test_manual.sh 2>&1 | tee report.log # ====================================================================================== def test_3rd_party(name: str) -> str: return ( - install_cp2k(version="sdbg", arch="local", prod=False) + install_cp2k(version="sdbg", arch="local") + fr""" # Run test for {name}. COPY ./tools/docker/scripts/test_{name}.sh . @@ -198,7 +198,7 @@ RUN ./test_{name}.sh 2>&1 | tee report.log def print_cached_report() -> str: return r""" # Output the report if the image is old and was therefore pulled from the build cache. -CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' +CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/' #EOF """ @@ -207,7 +207,7 @@ CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/' # ====================================================================================== def production(version: str, arch: str = "local") -> str: return ( - install_cp2k(version=version, arch=arch, prod=True) + install_cp2k(version=version, arch=arch, revision=True, prod=True) + fr""" # Run regression tests. ARG TESTOPTS @@ -218,7 +218,8 @@ RUN /bin/bash -c " \ # Setup entry point for production. COPY ./tools/docker/scripts/prod_entrypoint.sh ./ -ENTRYPOINT ["./prod_entrypoint.sh", "{arch}", "{version}"] +WORKDIR /mnt +ENTRYPOINT ["/workspace/cp2k/prod_entrypoint.sh", "{arch}", "{version}"] CMD ["cp2k", "--help"] #EOF @@ -227,11 +228,13 @@ CMD ["cp2k", "--help"] # ====================================================================================== -def install_cp2k(version: str, arch: str, prod: bool) -> str: +def install_cp2k( + version: str, arch: str, revision: bool = False, prod: bool = False +) -> str: input_lines = [] run_lines = [] - if prod: + if revision: input_lines.append("ARG GIT_COMMIT_SHA") run_lines.append( 'if [ -n "${GIT_COMMIT_SHA}" ] ; then' @@ -255,7 +258,7 @@ def install_cp2k(version: str, arch: str, prod: bool) -> str: if prod: run_lines.append(f"make -j ARCH={arch} VERSION={version}") - run_lines.append(f"rm -rf lib obj exe/{arch}/*_unittest.{version}") + run_lines.append(f"rm -rf lib obj exe/{arch}/libcp2k_unittest.{version}") else: run_lines.append( f"( make -j ARCH={arch} VERSION={version} &> /dev/null || true )"