Skip to content
Snippets Groups Projects

feat: install most dependencies in cacheable layer, before adding main

Merged Wouter Deconinck requested to merge cacheable-layer into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -117,7 +117,7 @@ RUN git clone --filter=tree:0 https://github.com/${KEY4HEPSPACK_ORGREPO}.git ${K
## ========================================================================================
FROM spack as builder
## Setup our custom environment (secret mount for write-enabled mirror)
## 1. Setup our default environment (secret mount for write-enabled mirror)
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=dev
ENV SPACK_ENV=/opt/spack-environment/${ENV}
@@ -135,7 +135,7 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
&& ccache --show-stats \
&& ccache --zero-stats
## Setup our custom environment with custom versions (on top of cached layer)
## 2. Setup our environment with custom versions (on top of cached layer)
ARG JUGGLER_VERSION=""
ARG EICRECON_VERSION=""
ADD https://eicweb.phy.anl.gov/api/v4/projects/EIC%2Fjuggler/repository/tree?ref=${JUGGLER_VERSION} /tmp/juggler.json
@@ -154,6 +154,7 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
&& if [ -n ${EICRECON_VERSION} ] ; then \
spack rm eicrecon && spack add eicrecon@git.${EICRECON_VERSION} ; \
fi \
&& spack concretize --force --fresh \
&& make --jobs ${jobs} --keep-going --directory /opt/spack-environment \
SPACK_ENV=${SPACK_ENV} \
BUILDCACHE_MIRROR="local eics3rw" \
Loading