Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
29
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Commits
ccc0e228
Commit
ccc0e228
authored
1 year ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: use oci build cache on eicweb and ghcr
parent
aeac427e
No related branches found
No related tags found
1 merge request
!792
feat: use oci build cache on eicweb and ghcr
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
containers/jug/dev.Dockerfile
+2
-10
2 additions, 10 deletions
containers/jug/dev.Dockerfile
mirrors.yaml.in
+12
-0
12 additions, 0 deletions
mirrors.yaml.in
spack-environment/Makefile
+7
-3
7 additions, 3 deletions
spack-environment/Makefile
with
21 additions
and
13 deletions
containers/jug/dev.Dockerfile
+
2
−
10
View file @
ccc0e228
...
...
@@ -70,14 +70,6 @@ spack compiler find --scope site
spack config blame compilers
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
## - this always adds the read-only mirror to the container
## - the write-enabled mirror is provided later as a secret mount
...
...
@@ -144,13 +136,13 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
<<
EOF
set -e
export CCACHE_DIR=/ccache
spack buildcache update-index local
find /var/cache/spack/blobs/sha256/ -atime +7 -delete
spack buildcache update-index eics3rw
spack env activate --dir ${SPACK_ENV}
spack add juggler@git.${JUGGLER_VERSION}
spack add eicrecon@git.${EICRECON_VERSION}
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 --zero-stats
EOF
...
...
This diff is collapsed.
Click to expand it.
mirrors.yaml.in
+
12
−
0
View file @
ccc0e228
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:
fetch:
url: s3://eictest/EPIC/spack/${SPACK_VERSION}
...
...
This diff is collapsed.
Click to expand it.
spack-environment/Makefile
+
7
−
3
View file @
ccc0e228
...
...
@@ -7,7 +7,9 @@ export SPACK_COLOR = always
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
...
...
@@ -18,11 +20,13 @@ include $(SPACK_ENV)/spack.mk
endif
$(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/%
@
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
$@
$(SPACK_ENV)/spack.lock
:
$(SPACK_ENV)/spack.yaml Makefile
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment