Skip to content

Commit db80abd

Browse files
committed
feat: add custom versions in $ENV/epic with include_concrete of $ENV
1 parent c2d8ac9 commit db80abd

File tree

15 files changed

+119
-49
lines changed

15 files changed

+119
-49
lines changed

containers/eic/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ ARG TARGETPLATFORM
159159
# Open Container Initiative labels
160160
LABEL org.opencontainers.image.title="Electron-Ion Collider build concretization image (custom configuration, $TARGETPLATFORM)"
161161

162+
# Set spack environment directory
163+
ENV SPACK_ENV=/opt/spack-environment/${ENV}/epic
164+
162165
## 2. Setup our environment with custom versions (on top of cached layer)
163166
## Note: these default versions are just the very first commit.
164167
ARG EDM4EIC_VERSION="8aeb507f93a93257c99985efbce0ec1371e0b331"
@@ -179,8 +182,8 @@ if [ "${EICRECON_VERSION}" != "28108da4a1e8919a05dfdb5f11e114800a2cbe96" ] ; the
179182
spack deconcretize -y --all eicrecon
180183
fi
181184
if [ "${EPIC_VERSION}" != "c1827f05430b2051df8a0b421db1cbab87165e0b" ] ; then
182-
sed -i "/# EPIC_VERSION$/ s/epic\s/epic@git.${EPIC_VERSION}=main /" /opt/spack-environment/${ENV}/spack.yaml
183-
sed -i "/# EPIC_VERSION$/ s/epic@main\s/epic@git.${EPIC_VERSION}=main /" /opt/spack-environment/${ENV}/spack.yaml
185+
sed -i "/# EPIC_VERSION$/ s/epic\s/epic@git.${EPIC_VERSION}=main /" /opt/spack-environment/${ENV}/epic/spack.yaml
186+
sed -i "/# EPIC_VERSION$/ s/epic@main\s/epic@git.${EPIC_VERSION}=main /" /opt/spack-environment/${ENV}/epic/spack.yaml
184187
spack deconcretize -y --all epic
185188
fi
186189
if [ "${JUGGLER_VERSION}" != "df87bf1f8643afa8e80bece9d36d6dc26dfe8132" ] ; then
@@ -228,7 +231,6 @@ RUN --mount=type=cache,target=/ccache,id=ccache-${TARGETPLATFORM} \
228231
set -e
229232
export CCACHE_DIR=/ccache
230233
spack ${SPACK_FLAGS} install ${SPACK_INSTALL_FLAGS}
231-
232234
spack gc --yes-to-all go go-bootstrap rust rust-bootstrap py-setuptools-rust py-maturin
233235
ccache --show-stats
234236
ccache --zero-stats
@@ -245,9 +247,15 @@ ARG TARGETPLATFORM
245247
# Open Container Initiative labels
246248
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime concretization image (custom configuration, $TARGETPLATFORM)"
247249

250+
# Set spack environment directory
251+
ENV SPACK_ENV=/opt/spack-environment/${ENV}/epic
252+
248253
COPY --from=builder_installation_custom \
249254
/opt/spack-environment/${ENV}/spack.* \
250255
/opt/spack-environment/${ENV}/
256+
COPY --from=builder_installation_custom \
257+
/opt/spack-environment/${ENV}/epic/spack.* \
258+
/opt/spack-environment/${ENV}/epic/
251259
COPY --from=builder_installation_custom \
252260
/opt/spack-environment/packages.yaml \
253261
/opt/spack-environment/
@@ -268,8 +276,9 @@ RUN --mount=type=cache,target=/var/cache/spack \
268276
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
269277
<<EOF
270278
set -e
279+
spack env activate --dir ${SPACK_ENV}
271280
spack ${SPACK_FLAGS} install ${SPACK_INSTALL_FLAGS} --use-buildcache only
272-
spack gc --yes-to-all
281+
spack gc --yes-to-all go go-bootstrap rust rust-bootstrap py-setuptools-rust py-maturin
273282
EOF
274283

275284

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
spack:
2+
include:
3+
- ../../concretizer.yaml
4+
- ../../packages.yaml
5+
- ../../view.yaml
6+
include_concrete:
7+
- /opt/spack-environment/ci
8+
specs:
9+
- algorithms
10+
- edm4eic
11+
- eicrecon
12+
- epic@main # EPIC_VERSION
13+
- juggler

spack-environment/ci/spack.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ spack:
77
- acts
88
- actsvg
99
- afterburner
10-
- algorithms
1110
- cmake
1211
- covfie
1312
- dd4hep -ddeve
14-
- edm4eic
1513
- edm4hep
16-
- eicrecon
1714
- eigen
18-
- epic@main # EPIC_VERSION
1915
- fastjet
2016
- fjcontrib
2117
- fmt
@@ -31,7 +27,6 @@ spack:
3127
- irt
3228
- iwyu
3329
- jana2
34-
- juggler
3530
- nopayloadclient
3631
- npsim -geocad
3732
- onnx
@@ -73,4 +68,4 @@ spack:
7368
- root -opengl -webgui
7469
- snakemake
7570
- spdlog
76-
- xrootd
71+
- xrootd
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
spack:
2+
include:
3+
- ../../concretizer.yaml
4+
- ../../packages.yaml
5+
- ../../view.yaml
6+
include_concrete:
7+
- /opt/spack-environment/ci_without_acts
8+
specs:
9+
- algorithms
10+
- edm4eic
11+
- epic@main # EPIC_VERSION

spack-environment/ci_without_acts/spack.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ spack:
66
specs:
77
- actsvg
88
- afterburner
9-
- algorithms
109
- cmake
1110
- covfie
1211
- dd4hep -ddeve
13-
- edm4eic
1412
- edm4hep
1513
- eigen
16-
- epic@main # EPIC_VERSION
1714
- fastjet
1815
- fjcontrib
1916
- fmt
@@ -70,4 +67,4 @@ spack:
7067
- root -opengl -webgui
7168
- snakemake
7269
- spdlog
73-
- xrootd
70+
- xrootd
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
spack:
2+
include:
3+
- ../../concretizer.yaml
4+
- ../../packages.yaml
5+
- ../../view.yaml
6+
include_concrete:
7+
- /opt/spack-environment/cuda
8+
concretizer:
9+
unify: when_possible # multiple epic versions
10+
specs:
11+
- algorithms
12+
- edm4eic
13+
- eicrecon
14+
- epic@main # EPIC_VERSION
15+
- epic@25.07.0
16+
- epic@25.08.0
17+
- epic@25.09.0
18+
- epic@25.10.0
19+
- epic@25.10.1
20+
- epic@25.10.2
21+
- epic@25.10.3
22+
- epic@25.11.0
23+
- juggler

spack-environment/cuda/spack.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ spack:
99
- acts +cuda cuda_arch=75
1010
- actsvg
1111
- afterburner
12-
- algorithms
1312
- cairo
1413
- catch2
1514
- celeritas +cuda cuda_arch=75
@@ -24,20 +23,10 @@ spack:
2423
- dd4hep +ddeve
2524
- dpmjet
2625
- east
27-
- edm4eic
2826
- edm4hep
2927
- eic-smear
30-
- eicrecon
3128
- eigen
3229
- emacs
33-
- epic@main # EPIC_VERSION
34-
- epic@25.08.0
35-
- epic@25.09.0
36-
- epic@25.10.0
37-
- epic@25.10.1
38-
- epic@25.10.2
39-
- epic@25.10.3
40-
- epic@25.11.0
4130
- fastjet
4231
- fjcontrib
4332
- fmt
@@ -50,7 +39,6 @@ spack:
5039
- imagemagick
5140
- irt
5241
- jana2
53-
- juggler
5442
- k4actstracking
5543
- k4fwcore
5644
- lcov
@@ -106,4 +94,4 @@ spack:
10694
- stow
10795
- valgrind
10896
- xrootd
109-
- xeyes
97+
- xeyes
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
spack:
2+
include:
3+
- ../../concretizer.yaml
4+
- ../../packages.yaml
5+
- ../../view.yaml
6+
include_concrete:
7+
- /opt/spack-environment/dbg
8+
specs:
9+
- algorithms build_type=Debug
10+
- edm4eic build_type=Debug
11+
- eicrecon build_type=Debug
12+
- epic build_type=Debug # EPIC_VERSION

spack-environment/dbg/spack.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ spack:
55
- ../view.yaml
66
specs:
77
- acts build_type=Debug
8-
- algorithms build_type=Debug
98
- cmake
109
- dd4hep build_type=Debug
11-
- edm4eic build_type=Debug
1210
- edm4hep build_type=Debug
13-
- eicrecon build_type=Debug
14-
- epic build_type=Debug # EPIC_VERSION
1511
- gdb
1612
- irt build_type=Debug
1713
- jana2 build_type=Debug
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
spack:
2+
include:
3+
- ../../concretizer.yaml
4+
- ../../packages.yaml
5+
- ../../view.yaml
6+
include_concrete:
7+
- /opt/spack-environment/prod
8+
specs:
9+
- algorithms
10+
- edm4eic
11+
- eicrecon
12+
- epic # EPIC_VERSION
13+
- juggler

0 commit comments

Comments
 (0)