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
e32b82bf
Commit
e32b82bf
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: move environments into directories
parent
6b538541
No related branches found
No related tags found
1 merge request
!529
feat: move environments into directories
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
containers/jug/dev.Dockerfile
+11
-8
11 additions, 8 deletions
containers/jug/dev.Dockerfile
spack-environment/dev/spack.yaml
+0
-0
0 additions, 0 deletions
spack-environment/dev/spack.yaml
with
11 additions
and
8 deletions
containers/jug/dev.Dockerfile
+
11
−
8
View file @
e32b82bf
...
...
@@ -97,10 +97,12 @@ RUN git clone https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \
&&
spack repo add
--scope
site
"
${
EICSPACK_ROOT
}
"
## Setup our custom environment
COPY
--from=spack spack.yaml /opt/spack-environment/
COPY
--from=spack spack-environment/ /opt/spack-environment/
ARG
ENV=dev
RUN
rm
-r
/usr/local
\
&&
cd
/opt/spack-environment
\
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
spack
env
activate /opt/spack-environment/
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
spack concretize
--fresh
...
...
@@ -120,7 +122,7 @@ RUN rm -r /usr/local \
RUN
--mount
=
type
=
cache,target
=
/var/cache/spack-mirror,sharing
=
locked
\
cd
/opt/spack-environment
\
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
spack
env
activate
.
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
status
=
0
\
&&
spack
install
-j64
--no-check-signature
\
||
spack
install
-j64
--no-check-signature
\
...
...
@@ -148,7 +150,7 @@ ARG S3RW_ACCESS_KEY=""
ARG
S3RW_SECRET_KEY=""
RUN
cd
/opt/spack-environment
\
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
spack
env
activate
.
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
if
[
-n
"
${
S3RW_ACCESS_KEY
}
"
]
;
then
\
spack mirror add
--scope
site
\
--s3-endpoint-url
https://eics3.sdcc.bnl.gov:9000
\
...
...
@@ -176,7 +178,7 @@ RUN --mount=type=cache,target=/var/cache/pip \
echo
"Installing additional python packages"
\
&&
cd
/opt/spack-environment
\
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
spack
env
activate
.
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
python
-m
pip
install
\
--trusted-host
pypi.org
\
--trusted-host
files.pythonhosted.org
\
...
...
@@ -192,11 +194,12 @@ RUN cd /opt/spack-environment \
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
echo
-n
""
\
&&
echo
"Grabbing environment info"
\
&&
spack
env
activate
--sh
-
d
.
\
&&
spack
env
activate
--sh
-
-dir
/opt/spack-environment/
${
ENV
}
\
|
sed
"s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?"
\
|
sed
'/MANPATH/ s/;$/:;/'
\
>
/etc/profile.d/z10_spack_environment.sh
\
&&
cd
/opt/spack-environment
&&
spack
env
activate
.
\
&&
cd
/opt/spack-environment
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
echo
-n
""
\
&&
echo
"Add extra environment variables for Jug, Podio and Gaudi"
\
&&
echo
"export PODIO=
$(
spack location
-i
podio
)
;"
\
...
...
@@ -219,7 +222,7 @@ FROM builder as staging
# Garbage collect in environment
RUN
cd
/opt/spack-environment
\
&&
source
$SPACK_ROOT
/share/spack/setup-env.sh
\
&&
spack
env
activate
.
\
&&
spack
env
activate
--dir
/opt/spack-environment/
${
ENV
}
\
&&
spack gc
-y
# Garbage collect in git
...
...
This diff is collapsed.
Click to expand it.
spack.yaml
→
spack-environment/dev/
spack.yaml
+
0
−
0
View file @
e32b82bf
File moved
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