Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
38
Issue boards
Milestones
Wiki
Code
Merge requests
28
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
36cd8a2f
Commit
36cd8a2f
authored
1 month ago
by
Eric Müller
Browse files
Options
Downloads
Patches
Plain Diff
feat(CI,JUSUF): transparent base image
parent
a97dd76c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+23
-4
23 additions, 4 deletions
.gitlab-ci.yml
with
23 additions
and
4 deletions
.gitlab-ci.yml
+
23
−
4
View file @
36cd8a2f
...
...
@@ -285,14 +285,33 @@ build-esd-image_JUSUF:
# create a sandbox/image for performing an spack install inside based on some base image/install
-
rm -rf $TMPDIR
-
mkdir $TMPDIR ||
true
-
apptainer build --fix-perms --force --sandbox ${SANDBOX_ROOT}/ docker://${BUILD_ENV_DOCKER_IMAGE}
-
|
cat <<EOF >image.def
Bootstrap: scratch
%setup
mkdir \${APPTAINER_ROOTFS}/bin
# /etc exists
touch \${APPTAINER_ROOTFS}/etc/passwd
touch \${APPTAINER_ROOTFS}/etc/group
touch \${APPTAINER_ROOTFS}/etc/localtime
mkdir \${APPTAINER_ROOTFS}/lib
mkdir \${APPTAINER_ROOTFS}/lib64
mkdir \${APPTAINER_ROOTFS}/usr
mkdir -p \${APPTAINER_ROOTFS}/${INSTALLATION_ROOT}
# JUSUF speciale
mkdir \${APPTAINER_ROOTFS}/p
mkdir -p \${APPTAINER_ROOTFS}/etc/FZJ
# /var exists
EOF
-
cat image.def
-
apptainer build --fix-perms --force --sandbox ${SANDBOX_ROOT}/ image.def
# run installation script inside future container environment
# => DAG concretization, subsequent cache access + fetching and actual build should be separate steps
-
mkdir --mode=0777 -p ${SANDBOX_ROOT}/${INSTALLATION_ROOT}
# begin of fixup for JUSUF
-
mkdir --mode=0777 -p ${SANDBOX_ROOT}/p
-
mkdir --mode=0777 -p ${SANDBOX_ROOT}/etc/FZJ
# end of fixup for JUSUF
-
export APPTAINER_BIND="/bin,/lib,/lib64,/usr,/p,/etc/FZJ"
-
apptainer exec --writable --fakeroot --cwd / ${SANDBOX_ROOT} bash -c "which python3"
-
apptainer exec --writable --bind ${CI_PROJECT_DIR}:${INSTALLATION_ROOT} --cwd ${INSTALLATION_ROOT} ${SANDBOX_ROOT} bash ./install_spack_env.sh $SPACK_JOBS $INSTALLATION_ROOT ${INSTALLATION_ROOT} $CI_SPACK_ENV "" $UPDATE_SPACK_OCI_CACHES $OCI_CACHE_PREFIX
-
echo "export SYSTEMNAME=${SYSTEMNAME}" >> ${SANDBOX_ROOT}/.singularity.d/env/90-environment.sh
-
echo ". ${INSTALLATION_ROOT}/vendor/spack/var/spack/environments/${CI_SPACK_ENV}/load_env.sh" >> ${SANDBOX_ROOT}/.singularity.d/env/90-environment.sh
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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