Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
4473aa57
Commit
4473aa57
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: allow specifying org/repo for spack and eic-spack
parent
56df32de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!412
feat: allow specifying org/repo for spack and eic-spack
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+11
-1
11 additions, 1 deletion
.gitlab-ci.yml
containers/jug/dev.Dockerfile
+10
-17
10 additions, 17 deletions
containers/jug/dev.Dockerfile
with
21 additions
and
18 deletions
.gitlab-ci.yml
+
11
−
1
View file @
4473aa57
...
...
@@ -5,6 +5,8 @@ variables:
## note: nightly builds will always use the master/main branch
JUGGLER_VERSION
:
"
v9.0.0"
## Spack organization and repository, e.g. spack/spack
SPACK_ORGREPO
:
"
spack/spack"
## Spack github version, e.g. v0.18.1 or commit hash
SPACK_VERSION
:
"
v0.19.0"
## Space-separated list of spack cherry-picks
...
...
@@ -12,10 +14,14 @@ variables:
## Ref: https://github.com/spack/spack/commit/[hash]
## [hash]: [description]
## Spack github version, e.g. v0.18 branch, v0.18.1 tag, or commit hash
## EIC spack organization and repository, e.g. eic/eic-spack
EICSPACK_ORGREPO
:
"
eic/eic-spack"
## EIC spack github version, e.g. v0.18 branch, v0.18.1 tag, or commit hash
EICSPACK_VERSION
:
"
v0.19"
## Space-separated list of eic-spack cherry-picks
EICSPACK_CHERRYPICKS
:
"
"
## Ref: https://github.com/eic/eic-spack/commit/[hash]
## [hash]: [description]
## We need to enable Docker Buildkit to use cache mounts and better
## build performance overall
...
...
@@ -240,8 +246,10 @@ jug_dev:default:
--target=builder
-f containers/jug/dev.Dockerfile
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_ORGREPO="${SPACK_ORGREPO}"
--build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg EICSPACK_ORGREPO="${EICSPACK_ORGREPO}"
--build-arg EICSPACK_VERSION="${EICSPACK_VERSION}"
--build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}"
--build-arg CACHE_BUST=${PACKAGE_HASH}
...
...
@@ -252,8 +260,10 @@ jug_dev:default:
-
docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/jug/dev.Dockerfile
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_ORGREPO="${SPACK_ORGREPO}"
--build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg EICSPACK_ORGREPO="${EICSPACK_ORGREPO}"
--build-arg EICSPACK_VERSION="${EICSPACK_VERSION}"
--build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}"
--build-arg CACHE_BUST=${PACKAGE_HASH}
...
...
This diff is collapsed.
Click to expand it.
containers/jug/dev.Dockerfile
+
10
−
17
View file @
4473aa57
...
...
@@ -23,25 +23,16 @@ RUN --mount=type=cache,target=/var/cache/apt \
## Setup spack
## parts:
ENV
SPACK_ROOT=/opt/spack
ARG
SPACK_ORGREPO="spack/spack"
ARG
SPACK_VERSION="develop"
ARG
SPACK_CHERRYPICKS=""
ADD
https://api.github.com/repos/
spack/spack
/commits/$SPACK_VERSION /tmp/spack.json
ADD
https://api.github.com/repos/
${SPACK_ORGREPO}
/commits/$
{
SPACK_VERSION
}
/tmp/spack.json
RUN
echo
"Part 1: regular spack install (as in containerize)"
\
&&
git clone https://github.com/spack/spack.git /tmp/spack-staging
\
&&
cd
/tmp/spack-staging
\
&&
git checkout
$SPACK_VERSION
\
&&
git clone https://github.com/
${
SPACK_ORGREPO
}
.git
${
SPACK_ROOT
}
\
&&
git
-C
${
SPACK_ROOT
}
checkout
${
SPACK_VERSION
}
\
&&
if
[
-n
"
$SPACK_CHERRYPICKS
"
]
;
then
\
git cherry-pick
-n
$SPACK_CHERRYPICKS
;
\
git
-C
${
SPACK_ROOT
}
cherry-pick
-n
$SPACK_CHERRYPICKS
;
\
fi
\
&&
cd
-
\
&&
mkdir
-p
$SPACK_ROOT
\
&&
cp
-r
/tmp/spack-staging/bin
$SPACK_ROOT
/bin
\
&&
cp
-r
/tmp/spack-staging/etc
$SPACK_ROOT
/etc
\
&&
cp
-r
/tmp/spack-staging/lib
$SPACK_ROOT
/lib
\
&&
cp
-r
/tmp/spack-staging/share
$SPACK_ROOT
/share
\
&&
cp
-r
/tmp/spack-staging/var
$SPACK_ROOT
/var
\
&&
cp
-r
/tmp/spack-staging/.git
$SPACK_ROOT
/.git
\
&&
rm
-rf
/tmp/spack-staging
\
&&
echo
'export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH'
\
>> $SPACK_ROOT/share/setup-env.sh \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
...
...
@@ -81,10 +72,12 @@ ARG CACHE_BUST="hash"
ARG
CACHE_NUKE=""
## Setup our custom package overrides
ENV
EICSPACK_ROOT=$SPACK_ROOT/var/spack/repos/eic-spack
ENV
EICSPACK_ROOT=${SPACK_ROOT}/var/spack/repos/eic-spack
ARG
EICSPACK_ORGREPO="eic/eic-spack"
ARG
EICSPACK_VERSION="$SPACK_VERSION"
ADD
https://api.github.com/repos/eic/eic-spack/commits/$EICSPACK_VERSION /tmp/eic-spack.json
RUN
git clone https://github.com/eic/eic-spack.git
${
EICSPACK_ROOT
}
\
ARG
EICSPACK_CHERRYPICKS=""
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
}
\
&&
git
-C
${
EICSPACK_ROOT
}
checkout
${
EICSPACK_VERSION
}
\
&&
if
[
-n
"
${
EICSPACK_CHERRYPICKS
}
"
]
;
then
\
git
-C
${
EICSPACK_ROOT
}
cherry-pick
-n
${
EICSPACK_CHERRYPICKS
}
;
\
...
...
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