Generate container recipes with environments#14202
Conversation
This comment has been minimized.
This comment has been minimized.
|
@alalazo, just to clarify... The PR will stop at the phase of creating the Dockerfile or a Singularity definition file? Or will it continue to build an image? |
|
@victorusu It will just create the recipe. The rationale is that a recipe can be consumed in many ways and it wouldn't make sense for Spack to force users to employ only the ones we'll wrap (e.g. you can send it to a remote builder, build it with different tools, etc.). I also think it wouldn't be that great convenience to users to have the build wrapped, while there will be some maintenance cost associated with it. |
934cf5c to
5a65ada
Compare
5a65ada to
c4b306d
Compare
a1b8654 to
b7f1fc9
Compare
|
If I wanted my container ignore certs (e.g. |
I think: config:
verify_ssl: falsein the Spack environment should do it. |
becker33
left a comment
There was a problem hiding this comment.
A couple questions about the tests, and a couple comments about code clarity.
d5dbef5 to
12fd35f
Compare
|
@alalazo This implementation can also save space by deleting Something like this... |
tgamblin
left a comment
There was a problem hiding this comment.
I have some minor change requests, but otherwise this is nearly ready to go!
The command 'spack containerize' has been added to generate recipes to build container images from a spack.yaml file. The image format supported so far are 'docker' and 'singularity'. Recipe generation is based on Jinja2 templates, most of the logic is under the 'spack.container' package.
Before we were sourcing a file under profile.d as it is done in Docker
This adds the possibility to customize `%runscript`, `%startscript`, `%help` and `%test`.
2c614a2 to
2e21587
Compare
|
@tgamblin I think the requests have been addressed. Let me know if there's anything else to be done. |
|
Can you please share a sample to build for singularity recipe with spack command? |
|
@samcom12 If you use: format: singularitySpack should output a valid Singularity definition file. |
|
Thank you Alalazo... |
depends on #13534
closes #7204
This PR adds a new command to Spack:
which takes an environment with an additional
containersection:and turns it into a
Dockerfileor a Singularity definition file, for instance: