Docker: Improve Spack image build caching (#5462)

This commit is contained in:
SY Wang 2026-06-25 22:28:47 +08:00 committed by GitHub
parent 02e5e7c6ee
commit 1e0ab71985
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 231 additions and 126 deletions

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_openmpi-pdbg}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv pdbg -gpu none -mpi openmpi -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv pdbg -gpu none -mpi openmpi -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_openmpi-psmp}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -mpi openmpi -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gpu none -mpi openmpi -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_pdbg}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv pdbg -gpu none -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv pdbg -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -34,18 +34,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_pdbg-rawhide}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv pdbg -gpu none -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv pdbg -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -67,11 +72,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-4x2}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -50,18 +50,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-P100}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu P100 -gv 13 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 13 -gpu P100 -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -89,11 +94,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -34,18 +34,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-fedora}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -67,11 +72,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc10}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 10 -mpi mpich -ue -df libtorch -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 10 -gpu none -mpi mpich -df libtorch -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc11}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 11 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 11 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc12}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 12 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 12 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc13}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 13 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 13 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc14}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 14 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 14 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc15}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 15 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 15 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-gcc16}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 16 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 16 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -39,18 +39,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-opensuse}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 13 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 13 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -72,11 +77,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -34,18 +34,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_psmp-rockylinux}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv psmp -gpu none -gv 14 -mpi mpich -ue -ef openpmd
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv psmp -gv 14 -gpu none -mpi mpich -ef openpmd
###### Stage 3: Install CP2K ######
@ -68,11 +73,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv sdbg -gpu none -mpi no -ue
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv sdbg -gpu none -mpi no
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_ssmp}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv ssmp -gpu none -mpi no -ue
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv ssmp -gpu none -mpi no
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -50,18 +50,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_ssmp-P100}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv ssmp -gpu P100 -gv 13 -mpi no -ue
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv ssmp -gv 13 -gpu P100 -mpi no
###### Stage 3: Install CP2K ######
@ -89,11 +94,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -43,18 +43,23 @@ ENV IMAGE_TAG=${IMAGE_TAG:-spack_ssmp-static}
ARG SPACK_CACHE
ENV SPACK_CACHE="${SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv ssmp-static -gpu none -gv 14 -mpi no
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv ssmp-static -gv 14 -gpu none -mpi no
###### Stage 3: Install CP2K ######
@ -75,11 +80,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf

View file

@ -733,18 +733,23 @@ ENV IMAGE_TAG=${{IMAGE_TAG:-{image_tag}}}
ARG SPACK_CACHE
ENV SPACK_CACHE="${{SPACK_CACHE:-s3://spack-cache --s3-endpoint-url=http://host.containers.internal:9000}}"
# Copy CP2K repository into container
WORKDIR /opt
COPY . cp2k/
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cv {version} -gpu {gpu_model} {gcc_version_flag} -mpi {mpi_mode} {use_externals} {feature_flags}
###### Stage 2: Build CP2K ######
FROM build_deps AS build_cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
RUN ./make_cp2k.sh -cv {version} {gcc_version_flag} -gpu {gpu_model} -mpi {mpi_mode} {feature_flags}
"""
)
@ -762,11 +767,11 @@ COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf