feat: avoid large copy into runtime image
This MR removes the many COPY
s from the builder to runtime image, which make it hard to reuse the default environment layer and causes large downloads.
The container is now built with two parallel tracks: one builder and one runtime.
## This docker build follows two tracks, in order to ensure that we build all packages
## in a builder image, but install them in a runtime image, while at the same time
## avoiding a expensive filesystem copy operation at the end that breaks layering.
##
## The build is split in an infrequently-changing default environment, upon which
## an environment with custom versions (e.g. individual commits) is layered. The
## custom environment will change frequently but layers will be smaller, allowing
## for easier deployment with smaller delta layers.
##
## The separation in a builder and runtime image is particularly relevant to end up with
## lightweight images for expensive build dependencies, such as for example CUDA.
##
## builder track runtime track
## ----------------------------------------------------------------------
## builder_image runtime_image
## builder_concretization_default
## builder_installation_default -> runtime_concretization_default (copy spack.lock)
## \-> runtime_installation_default (from buildcache)
## builder_concretization_custom
## builder_installation_custom -> runtime_concretization_custom (copy spack.lock)
## \-> runtime_installation_custom (from buildcache)
Edited by Wouter Deconinck
Merge request reports
Activity
assigned to @wdconinc
added 2 commits
added 4 commits
-
30f21f25...7aabfa5b - 3 commits from branch
master
- cc2c1106 - feat: rm large copy into runtime image
-
30f21f25...7aabfa5b - 3 commits from branch
added 3 commits
-
cc2c1106...287cdd04 - 2 commits from branch
master
- a9d08563 - feat: rm large copy into runtime image
-
cc2c1106...287cdd04 - 2 commits from branch
added 1 commit
- 7a0135fd - feat: mv spack/key4hep-spack/eic-spack into base
added 1 commit
- c877e79c - fix: ensure TARGETPLATFORM available in base
added 6 commits
-
2d0e793c - 1 commit from branch
master
- 1b2c43a7 - feat: rm large copy into runtime image
- c32f918a - feat: mv spack/key4hep-spack/eic-spack into base
- 15fcef95 - fix: ensure TARGETPLATFORM available in base
- 631477fd - fix: ensure base has spack version sourced
- 05321e4f - fix: don't override SHELL in builder
Toggle commit list-
2d0e793c - 1 commit from branch
added 1 commit
- 397a5766 - feat: split concretization from installation
Please register or sign in to reply