Skip to content
Snippets Groups Projects

fix: avoid locking local spack build cache

Merged Wouter Deconinck requested to merge no-spack-mirror-sharing-locked into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -102,7 +102,7 @@ RUN git clone https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \
@@ -102,7 +102,7 @@ RUN git clone https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \
COPY --from=spack spack-environment/ /opt/spack-environment/
COPY --from=spack spack-environment/ /opt/spack-environment/
ARG ENV=dev
ARG ENV=dev
ENV SPACK_ENV=/opt/spack-environment/${ENV}
ENV SPACK_ENV=/opt/spack-environment/${ENV}
RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \
RUN --mount=type=cache,target=/var/cache/spack-mirror \
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
source $SPACK_ROOT/share/spack/setup-env.sh \
source $SPACK_ROOT/share/spack/setup-env.sh \
&& spack env activate --dir ${SPACK_ENV} \
&& spack env activate --dir ${SPACK_ENV} \
@@ -112,7 +112,7 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \
@@ -112,7 +112,7 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \
BUILDCACHE_MIRROR=eic-spack
BUILDCACHE_MIRROR=eic-spack
## Create view at /usr/local
## Create view at /usr/local
RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \
RUN --mount=type=cache,target=/var/cache/spack-mirror \
source $SPACK_ROOT/share/spack/setup-env.sh \
source $SPACK_ROOT/share/spack/setup-env.sh \
&& spack env activate --dir ${SPACK_ENV} \
&& spack env activate --dir ${SPACK_ENV} \
&& rm -r /usr/local \
&& rm -r /usr/local \
Loading