diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile index 98008cf0012b141bc3af1e9397df002f36582bc8..ce384b6250e94f1e2a53162b8ef4b212359f13bc 100644 --- a/containers/jug/dev.Dockerfile +++ b/containers/jug/dev.Dockerfile @@ -102,13 +102,20 @@ COPY --from=spack spack-environment/ /opt/spack-environment/ ARG ENV=dev RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \ cd /opt/spack-environment \ - && rm -r /usr/local \ && source $SPACK_ROOT/share/spack/setup-env.sh \ && spack env activate --dir /opt/spack-environment/${ENV} \ && make -C /opt/spack-environment SPACK_ENV=${ENV} \ BUILDCACHE_DIR=/var/cache/spack-mirror \ BUILDCACHE_MIRROR=eic-spack +## Create view at /usr/local +RUN --mount=type=cache,target=/var/cache/spack-mirror,sharing=locked \ + cd /opt/spack-environment \ + && source $SPACK_ROOT/share/spack/setup-env.sh \ + && spack env activate --dir /opt/spack-environment/${ENV} \ + && rm -r /usr/local \ + && spack env view enable /usr/local + ## 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 diff --git a/spack-environment/dev/spack.yaml b/spack-environment/dev/spack.yaml index 7addddadfc8d651efbcaeaa35742bb5d31d7b975..16b5883908f43902e02a7a5f073a3b23e2b3fe81 100644 --- a/spack-environment/dev/spack.yaml +++ b/spack-environment/dev/spack.yaml @@ -76,8 +76,4 @@ spack: - stow@2.3.1 - tensorflow-lite@2.8.0 -xnnpack - xrootd@5.5.1 cxxstd=17 +python +scitokens-cpp - view: - default: - root: /usr/local - link: all - link_type: symlink + view: false