Skip to content

Commit ed2fb8d

Browse files
committed
setup modules in profile.d
1 parent fe35ce2 commit ed2fb8d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ EOF
7676

7777
RUN --mount=type=cache,target=/spack-buildcache ./dostarenv.sh star-loose
7878
RUN --mount=type=cache,target=/spack-buildcache ./dostarenv.sh ${starenv}
79-
# Load only the umbrella star-env module
80-
RUN <<-EOF
81-
spack -e ${starenv} module tcl loads star-env >> /star-spack/spack/var/spack/environments/${starenv}/loads
82-
EOF
8379

8480
# Strip all the binaries
8581
RUN find -L /opt/software/* -type f -exec readlink -f '{}' \; | \
@@ -88,6 +84,9 @@ RUN find -L /opt/software/* -type f -exec readlink -f '{}' \; | \
8884
grep 'x-executable\|x-archive\|x-sharedlib' | \
8985
awk -F: '{print $1}' | xargs strip -S
9086

87+
# Load only the umbrella star-env module
88+
RUN spack -e ${starenv} module tcl loads star-env >> /etc/profile.d/z10_load_spack_env_modules.sh
89+
9190

9291
FROM ${baseimg_os} AS starenv-stage
9392

@@ -99,7 +98,6 @@ SHELL ["/bin/bash", "-l", "-c"]
9998
COPY --from=build-stage /cern /cern
10099
COPY --from=build-stage /etc/profile.d /etc/profile.d
101100
COPY --from=build-stage /opt/software /opt/software
102-
COPY --from=build-stage /star-spack/spack/var/spack/environments/${starenv}/loads /etc/profile.d/z10_load_spack_env_modules.sh
103101
COPY --from=build-stage /star-spack/spack/share/spack/modules/linux-scientific7-x86_64_v3 /opt/linux-scientific7-x86_64
104102

105103
RUN sed -i 's/scientificlinux.org\/linux\/scientific\//scientificlinux.org\/linux\/scientific\/obsolete\//g' /etc/yum.repos.d/*

0 commit comments

Comments
 (0)