spack containerize: permit to customize the base images#15028
spack containerize: permit to customize the base images#15028scheibelp merged 13 commits intospack:developfrom
Conversation
|
My 2 cents is to retain the ability to install OS packages in the image. The rationale is to have something in-between the canned images (zero effort but zero control) and custom images (lots of control but potentially lots of effort). |
hartzell
left a comment
There was a problem hiding this comment.
I like this. Few inline comments.
ed71483 to
05fded7
Compare
|
Thanks for your hard work on this PR. May I make a friendly request? Can everyone please use gender-neutral language when describing users? For example, instead of “a user can still specify ... Spack version he wants to use”, write “a user can still specify ... Spack version they want to use”. Among lots of other good reasons, this would be in keeping with the Spack COC, e.g. the admonition to use “inclusive language”. |
|
@reidpr Edit done. I'll have a look at the docs later and adjust it too if I find anything. Thanks. |
|
This is great! please merge! |
|
@hartzell Do you have further requests wrt to docs or anything else? |
|
@svenevs I thought that given the positive comment in Spack's slack on |
scheibelp
left a comment
There was a problem hiding this comment.
I have a few minor requests but overall I think that "build"/"final" and "os"/"spack" are duplicate ways to specify the same thing, which I think is confusing. I added more detail (and what I'd like to see change) in the comment prefixed with "main concern".
hartzell
left a comment
There was a problem hiding this comment.
I'm not in a position to test this right now, but it looks good. Thanks!
63333ba to
86b08ba
Compare
86b08ba to
40c0337
Compare
5a452de to
5e91dd9
Compare
5e91dd9 to
d8f1713
Compare
d8f1713 to
d6acdd2
Compare
|
This might be off tangent, but since I mentioned it in my experiment above.... I "want" to use CentOS and/but I need to use newer compilers. My solution to that is to include [email protected] in the So, in spite of vary carefully doing a multistage build, I end up with a fairly large image (gcc is about 1.2GB). I could thin it by carefully trimming most of the gcc install tree (leaving just lib and lib64 might work), but that seems fragile. Is there something else I could/should be doing (don't say CentOS8...), or is this a fact of life? |
65c0e52 to
63711bb
Compare
|
Hi All. Any movement on this? |
|
@hartzell I'm keeping this PR rebased semi-frequently. Will try to have it merged for the next major release. |
|
Great. I'm currently running FWIW, my custom builder pre-builds gcc while my custom final needs to include our internal root CA certs. Is there a timeframe for the next major release? |
Before SC next month 🙂 |
|
Woo hoo! Thanks! |
63711bb to
70f5151
Compare
The ``base`` attribute has been renamed to ``images`` while the ``base:image`` attribute has been renamed ``images:os``. This commit is in preparation of a generalization to permit the use of custom base images in both the build and final stage.
The ``images`` attribute has now another mode of operation where users can specify both a ``build`` and a ``final`` custom base image.
Since now the base images can be customized it's redundant to also have a configure option to install os packages.
This reverts commit 05fded7.
Also fixed indentation as Paul suggested in another review.
70f5151 to
b0a3dd3
Compare
The documentation has been updated according to reviews. Examples have been extended and the "Setting Base Images" section has been divided into two subsections - one for each selection method.
scheibelp
left a comment
There was a problem hiding this comment.
My main request is to address whitespace handling in the template files (see https://github.com/spack/spack/pull/15028/files#r399576494). The rest of the comments are very minor (generally typos).
* releases/v0.16: (6003 commits) update CHANGELOG.md for v0.16.0 bump version number to 0.16.0 clingo: add `master` branch version (spack#19958) cmd: add `spack mark` command (spack#16662) spack test (spack#15702) Added -level_zero -rocm -opencl flags and sha256 for TAU v2.30. (spack#19962) Improve warning message for deprecated attributes in "packages.yaml" Documentation: spack load/environments prefix inspections (spack#19961) spack load/environments: allow customization of prefix inspections (spack#18260) spack containerize: allow users to customize the base image (spack#15028) concretizer: modified weights for providers and matching for externals concretizer: maximize the number of default values used for a single variant concretizer: don't require a provider for virtual deps if spec is external concretizer: spec_clauses() shouldn't emit node_compiler_hard for rule bodies. concretizer: don't generate rules for empty version lists concretizer: add a rule to avoid cycles in the graph of dependencies External packages have a consistent hash across different concretizers Don't fail if MV variants have a tuple as default value Fixup for target preferences Added unit tests to for regressions on open concretizer bugs ... # Conflicts: # .gitignore # lib/spack/spack/binary_distribution.py # lib/spack/spack/cmd/setup.py # lib/spack/spack/modules/common.py # var/spack/repos/builtin/packages/med/package.py # var/spack/repos/builtin/packages/mofem-cephas/package.py # var/spack/repos/builtin/packages/mofem-fracture-module/package.py # var/spack/repos/builtin/packages/mofem-users-modules/package.py # var/spack/repos/builtin/packages/mpich/package.py # var/spack/repos/builtin/packages/petsc/package.py # var/spack/repos/builtin/packages/python/package.py
closes #14802
closes #14879
This PR reworks a few attributes in the
containersubsection ofspack.yamlto permit the injection of custom base images both in the build and final stage. In more detail, users can still specify the base operating system and Spack version they want to use:in which case the generated recipe will use one of the Spack images built on Docker Hub for the build stage and the base OS image in the final stage or alternatively they can specify explicitly the two base images:
and it will be up to them to ensure their consistency. The ability to install OS packages in both the
buildandfinalstage has been retained. Handles to avoid an update of the available system packages have been added to the configuration to facilitate the generation of recipes permitting deterministic builds.Following the discussion in #14917 this PR takes at the moment a minimalist approach and thus removed the possibility to install OS packages in the generated image (if any is needed it should be the custom base image that takes care of that). In case this seems unwanted it will be sufficient to drop commit ed71483 to make this PR compatible with #14917 and #14879.