Skip to content
Snippets Groups Projects
Commit 28808770 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

fix: add SPACK_VERSION to local buildcache location

parent dcbe298e
No related branches found
No related tags found
1 merge request!605fix: add SPACK_VERSION to local buildcache location
...@@ -61,13 +61,13 @@ RUN declare -A target=( \ ...@@ -61,13 +61,13 @@ RUN declare -A target=( \
&& spack compiler find --scope site \ && spack compiler find --scope site \
&& spack config blame compilers && spack config blame compilers
## Setup spack buildcache mirrors ## Setup local buildcache mirrors
RUN --mount=type=cache,target=/var/cache/spack-mirror \ RUN --mount=type=cache,target=/var/cache/spack-mirror \
spack mirror add docker /var/cache/spack-mirror \ spack mirror add docker /var/cache/spack-mirror/${SPACK_VERSION} \
&& spack buildcache update-index -d /var/cache/spack-mirror \ && spack buildcache update-index -d /var/cache/spack-mirror/${SPACK_VERSION} \
&& spack mirror list && spack mirror list
## Setup eic-spack 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
ARG S3_ACCESS_KEY="" ARG S3_ACCESS_KEY=""
...@@ -78,7 +78,7 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \ ...@@ -78,7 +78,7 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \
--s3-endpoint-url https://eics3.sdcc.bnl.gov:9000 \ --s3-endpoint-url https://eics3.sdcc.bnl.gov:9000 \
--s3-access-key-id "${S3_ACCESS_KEY}" \ --s3-access-key-id "${S3_ACCESS_KEY}" \
--s3-access-key-secret "${S3_SECRET_KEY}" \ --s3-access-key-secret "${S3_SECRET_KEY}" \
eic-spack s3://eictest/EPIC/spack \ eics3 s3://eictest/EPIC/spack \
; fi \ ; fi \
&& spack mirror list && spack mirror list
...@@ -93,7 +93,7 @@ ARG EICSPACK_ORGREPO="eic/eic-spack" ...@@ -93,7 +93,7 @@ ARG EICSPACK_ORGREPO="eic/eic-spack"
ARG EICSPACK_VERSION="$SPACK_VERSION" ARG EICSPACK_VERSION="$SPACK_VERSION"
ARG EICSPACK_CHERRYPICKS="" ARG EICSPACK_CHERRYPICKS=""
ADD https://api.github.com/repos/${EICSPACK_ORGREPO}/commits/${EICSPACK_VERSION} /tmp/eic-spack.json ADD https://api.github.com/repos/${EICSPACK_ORGREPO}/commits/${EICSPACK_VERSION} /tmp/eic-spack.json
RUN git clone https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \ RUN git clone https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \
&& git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION} \ && git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION} \
&& if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then \ && if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then \
git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS} ; \ git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS} ; \
...@@ -112,8 +112,8 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \ ...@@ -112,8 +112,8 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
&& spack env activate --dir ${SPACK_ENV} \ && spack env activate --dir ${SPACK_ENV} \
&& make --jobs ${jobs} --keep-going --directory /opt/spack-environment \ && make --jobs ${jobs} --keep-going --directory /opt/spack-environment \
SPACK_ENV=${SPACK_ENV} \ SPACK_ENV=${SPACK_ENV} \
BUILDCACHE_DIR=/var/cache/spack-mirror \ BUILDCACHE_DIR=/var/cache/spack-mirror/${SPACK_VERSION} \
BUILDCACHE_MIRROR=eic-spack \ BUILDCACHE_MIRROR=eics3rw \
&& ccache --show-stats && ccache --show-stats
## Create view at /usr/local ## Create view at /usr/local
......
mirrors: mirrors:
eic-spack: eics3rw:
fetch: fetch:
url: s3://eictest/EPIC/spack url: s3://eictest/EPIC/spack
access_pair: access_pair:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment