Skip to content

Commit

Permalink
feat: rm cache nuke
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc committed Dec 28, 2023
1 parent 5f8dcee commit 18374c4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions containers/jug/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,12 @@ ccache --zero-stats
EOF

## Create view at /usr/local
RUN --mount=type=cache,target=/var/cache/spack <<EOF
RUN <<EOF
set -e
rm -r /usr/local
spack -e ${SPACK_ENV} env view enable /usr/local
EOF

## Optional, nuke the buildcache after install, before (re)caching
## This is useful when going to completely different containers,
## or intermittently to keep the buildcache step from taking too much time
ARG CACHE_NUKE=""
RUN --mount=type=cache,target=/var/cache/spack,sharing=locked <<EOF
[ -z "${CACHE_NUKE}" ] || rm -rf /var/cache/spack/mirror/${SPACK_VERSION}/build_cache/*
EOF

## Store environment
RUN <<EOF
set -e
Expand Down

0 comments on commit 18374c4

Please sign in to comment.