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
1b2c43a7
Commit
1b2c43a7
authored
10 months ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: rm large copy into runtime image
parent
2d0e793c
Branches
feat-context-service-overhaul
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
containers/jug/dev.Dockerfile
+12
-46
12 additions, 46 deletions
containers/jug/dev.Dockerfile
with
12 additions
and
46 deletions
containers/jug/dev.Dockerfile
+
12
−
46
View file @
1b2c43a7
...
@@ -230,6 +230,18 @@ spack -e ${SPACK_ENV} env view regenerate /opt/local
...
@@ -230,6 +230,18 @@ spack -e ${SPACK_ENV} env view regenerate /opt/local
spack -e ${SPACK_ENV} env view regenerate /opt/detector
spack -e ${SPACK_ENV} env view regenerate /opt/detector
EOF
EOF
## ensure /opt/local is the view, not a symlink
RUN
<<
EOF
set -ex
rm -rf /opt/local /opt/detector
LOCAL_PREFIX_PATH=$(realpath $(ls /opt/._local/ | tail -n1))
mv /opt/._local/${LOCAL_PREFIX_PATH} /opt/local
ln -s /opt/local /opt/._local/${LOCAL_PREFIX_PATH}
DETECTOR_PREFIX_PATH=$(realpath $(ls /opt/._detector/ | tail -n1))
mv /opt/._detector/${DETECTOR_PREFIX_PATH} /opt/detector
ln -s /opt/detector /opt/._detector/${DETECTOR_PREFIX_PATH}
EOF
## Place cvmfs catalogs
## Place cvmfs catalogs
RUN
<<
EOF
RUN
<<
EOF
touch ${SPACK_ROOT}/.cvmfscatalog
touch ${SPACK_ROOT}/.cvmfscatalog
...
@@ -283,52 +295,6 @@ for t in ${target[*]} ; do
...
@@ -283,52 +295,6 @@ for t in ${target[*]} ; do
done
done
EOF
EOF
## make sure we have the entrypoints setup correctly
ENTRYPOINT
[]
CMD
["bash", "--rcfile", "/etc/profile", "-l"]
USER
0
WORKDIR
/
## ========================================================================================
## STAGE 2
## Lean target image
## ========================================================================================
FROM
${DOCKER_REGISTRY}${RUNTIME_IMAGE}:${INTERNAL_TAG}
as
runtime
ARG
TARGETPLATFORM
LABEL
maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="jug_xl" \
march="$TARGETPLATFORM"
## copy over everything we need from builder
COPY
--from=builder /opt/spack /opt/spack
COPY
--from=builder /opt/spack-environment /opt/spack-environment
COPY
--from=builder /opt/software /opt/software
COPY
--from=builder /opt/._local /opt/._local
COPY
--from=builder /opt/._detector /opt/._detector
COPY
--from=builder /etc/profile.d /etc/profile.d
COPY
--from=builder /etc/jug_info /etc/jug_info
COPY
--from=builder /etc/eic-env.sh /etc/eic-env.sh
COPY
--from=builder /.singularity.d /.singularity.d
COPY
--from=builder /usr/bin/docker-shell /usr/bin/docker-shell
## Use spack entrypoint. NOTE: Requires `set -ex` in all multi-line scripts!
ENV
SPACK_ROOT=/opt/spack
SHELL
["docker-shell"]
## ensure /opt/local is the view, not a symlink
RUN
<<
EOF
set -ex
rm -rf /opt/local /opt/detector
LOCAL_PREFIX_PATH=$(realpath $(ls /opt/._local/ | tail -n1))
mv /opt/._local/${LOCAL_PREFIX_PATH} /opt/local
ln -s /opt/local /opt/._local/${LOCAL_PREFIX_PATH}
DETECTOR_PREFIX_PATH=$(realpath $(ls /opt/._detector/ | tail -n1))
mv /opt/._detector/${DETECTOR_PREFIX_PATH} /opt/detector
ln -s /opt/detector /opt/._detector/${DETECTOR_PREFIX_PATH}
EOF
## set ROOT TFile forward compatibility
## set ROOT TFile forward compatibility
RUN
sed
--in-place
--follow-symlinks
's/# \(TFile.v630forwardCompatibility:\) no/\1 yes/'
/opt/local/etc/root/system.rootrc
RUN
sed
--in-place
--follow-symlinks
's/# \(TFile.v630forwardCompatibility:\) no/\1 yes/'
/opt/local/etc/root/system.rootrc
...
...
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