Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • containers/eic_container
  • wdconinc/eic_container
  • tooba/eic_container
3 results
Show changes
Commits on Source (2)
...@@ -70,14 +70,6 @@ spack compiler find --scope site ...@@ -70,14 +70,6 @@ spack compiler find --scope site
spack config blame compilers spack config blame compilers
EOF EOF
## Setup local buildcache mirrors
RUN --mount=type=cache,target=/var/cache/spack <<EOF
set -e
spack mirror add local /var/cache/spack/mirror/${SPACK_VERSION}
spack buildcache update-index local
spack mirror list
EOF
## Setup eics3 buildcache mirrors ## Setup eics3 buildcache mirrors
## - this always adds the read-only mirror to the container ## - this always adds the read-only mirror to the container
## - the write-enabled mirror is provided later as a secret mount ## - the write-enabled mirror is provided later as a secret mount
...@@ -144,13 +136,13 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \ ...@@ -144,13 +136,13 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
<<EOF <<EOF
set -e set -e
export CCACHE_DIR=/ccache export CCACHE_DIR=/ccache
spack buildcache update-index local find /var/cache/spack/blobs/sha256/ -atime +7 -delete
spack buildcache update-index eics3rw spack buildcache update-index eics3rw
spack env activate --dir ${SPACK_ENV} spack env activate --dir ${SPACK_ENV}
spack add juggler@git.${JUGGLER_VERSION} spack add juggler@git.${JUGGLER_VERSION}
spack add eicrecon@git.${EICRECON_VERSION} spack add eicrecon@git.${EICRECON_VERSION}
spack concretize --fresh --force --quiet spack concretize --fresh --force --quiet
make --jobs ${jobs} --keep-going --directory /opt/spack-environment SPACK_ENV=${SPACK_ENV} BUILDCACHE_MIRROR="local eics3rw" make --jobs ${jobs} --keep-going --directory /opt/spack-environment SPACK_ENV=${SPACK_ENV} BUILDCACHE_MIRROR_ONLY_PACKAGE="eics3rw" BUILDCACHE_MIRROR_DEPENDENCIES="eicweb ghcr"
ccache --show-stats ccache --show-stats
ccache --zero-stats ccache --zero-stats
EOF EOF
...@@ -158,9 +150,8 @@ EOF ...@@ -158,9 +150,8 @@ EOF
## Create view at /usr/local ## Create view at /usr/local
RUN --mount=type=cache,target=/var/cache/spack <<EOF RUN --mount=type=cache,target=/var/cache/spack <<EOF
set -e set -e
spack env activate --dir ${SPACK_ENV}
rm -r /usr/local rm -r /usr/local
spack env view enable /usr/local spack -e ${SPACK_ENV} env view enable /usr/local
EOF EOF
## Optional, nuke the buildcache after install, before (re)caching ## Optional, nuke the buildcache after install, before (re)caching
......
mirrors: mirrors:
eicweb:
url: oci://${CI_REGISTRY}/${CI_PROJECT_PATH}/spack-${SPACK_VERSION}
push:
access_pair:
- ${CI_REGISTRY_USER}
- ${CI_REGISTRY_PASSWORD}
ghcr:
url: oci://ghcr.io/eic/spack-${SPACK_VERSION}
push:
access_pair:
- ${GITHUB_REGISTRY_USER}
- ${GITHUB_REGISTRY_TOKEN}
eics3rw: eics3rw:
fetch: fetch:
url: s3://eictest/EPIC/spack/${SPACK_VERSION} url: s3://eictest/EPIC/spack/${SPACK_VERSION}
......
...@@ -7,7 +7,9 @@ export SPACK_COLOR = always ...@@ -7,7 +7,9 @@ export SPACK_COLOR = always
SPACK_ENV ?= dev SPACK_ENV ?= dev
BUILDCACHE_MIRROR := BUILDCACHE_MIRROR_ONLY_PACKAGE :=
BUILDCACHE_MIRROR_DEPENDENCIES :=
BUILDCACHE_OCI_BASE_IMAGE := ghcr.io/eic/debian:stable-slim
.PHONY: all clean .PHONY: all clean
...@@ -18,11 +20,13 @@ include $(SPACK_ENV)/spack.mk ...@@ -18,11 +20,13 @@ include $(SPACK_ENV)/spack.mk
endif endif
$(SPACK_ENV)/push: $(addprefix $(SPACK_ENV)/push/,$($(SPACK_ENV)/SPACK_PACKAGE_IDS)) $(SPACK_ENV)/push: $(addprefix $(SPACK_ENV)/push/,$($(SPACK_ENV)/SPACK_PACKAGE_IDS))
$(foreach buildcache, $(BUILDCACHE_MIRROR), $(SPACK) buildcache update-index $(buildcache) ;) $(foreach buildcache, $(BUILDCACHE_MIRROR_ONLY_PACKAGE), $(SPACK) buildcache update-index $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_MIRROR_DEPENDENCIES), $(SPACK) buildcache update-index $(buildcache) ;)
$(SPACK_ENV)/push/%: $(SPACK_ENV)/install/% $(SPACK_ENV)/push/%: $(SPACK_ENV)/install/%
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(foreach buildcache, $(BUILDCACHE_MIRROR), $(SPACK) buildcache push --only=package --unsigned $(buildcache) /$(HASH) ;) # push $(SPEC) $(foreach buildcache, $(BUILDCACHE_MIRROR_ONLY_PACKAGE), $(SPACK) buildcache push --only=package --unsigned $(buildcache) /$(HASH) ;) # push $(SPEC)
$(foreach buildcache, $(BUILDCACHE_MIRROR_DEPENDENCIES), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) /$(HASH) | grep -v "Using cached archive" ;) # push $(SPEC)
@touch $@ @touch $@
$(SPACK_ENV)/spack.lock: $(SPACK_ENV)/spack.yaml Makefile $(SPACK_ENV)/spack.lock: $(SPACK_ENV)/spack.yaml Makefile
......