-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
containerize: pin the Spack version used in a container #21910
containerize: pin the Spack version used in a container #21910
Conversation
2c246d7
to
3355414
Compare
Some issues I found:
|
Thanks for test-driving the PR @haampie |
3355414
to
e4ad7dc
Compare
e4ad7dc
to
690e8a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor requests and some arg tweaks, and one larger question about bootstrapping images.
690e8a5
to
313b581
Compare
@tgamblin This is ready for another review |
@tgamblin ping |
ab4533c
to
2517ceb
Compare
@tgamblin Do you have some time for a second review? |
2517ceb
to
1b0ff7a
Compare
I updated the containers-on-pcluster workshop to reflect that. Do you also are going to kick out the CUDA binary problem from above? |
@kniec Maybe in a smaller, follow up PR? Would that work? |
@alalazo sure thing - I just kick that part out with spack containerize \
| sed -e '/RUN find -L /,+4d' > Dockerfile |
@vsoch With respect to Ubuntu 20.04 you can try: spack:
specs:
- zlib
container:
images:
os: ubuntu:20.04
spack:
ref: develop with this PR |
will do! |
Okay testing for 20.04! The Dockerfile looks great, builds without issue:
Shelling in is very straight forward:
I think my one question is if spack should be already on the path? As a user I wouldn't know what to do after shelling in and not seeing it.
|
@vsoch The Dockerfile, by default, is a 3 stage build where Spack is in the first two. The last stage is just the software required in the environment. You can: $ spack containerize --last-stage build If you want to stop before the last stage. |
ah okay, that does make sense. Sorry didn't look closely enough! |
@davidbeckingsale see this PR here for ubuntu 20.04 support |
@alalazo |
@kniec I think "target" would be confusing for people using Spack since in specs it's used to identify the target microarchitecture. |
yeah, that is true. |
This commit permits to specify the url and ref of the Spack instance to be used in a container recipe. If this is done an initial bootstrap stage is added, which builds an image with Spack setup and ready to install software. A few new OSes have been added: centos:8, amazonlinux:2, ubuntu:20.04, alpine:3.
d78d65b
to
6942705
Compare
This PR permits to specify the
url
andref
of the Spack instance used in a container recipe simply by expanding the YAML schema as outlined in #20442:The
resolve_sha
option, if true, verifies theref
by cloning the Spack repository in a temporary directory and transforming any tag or branch name to a commit sha. When this new ability is leveraged an additional "bootstrap" stage is added, which builds an image with Spack setup and ready to install software. The Spack repository to be used can be customized with theurl
keyword underspack
.Modifications: