-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improves documentation covering the creation of recipes for local containers. #652
Conversation
@@ -1859,7 +1859,8 @@ and tell shpc that we want it under the ``dinosaur/salad`` namespace. | |||
Registry entry dinosaur/salad:latest was added! Before shpc install, edit: | |||
/home/vanessa/Desktop/Code/shpc/registry/dinosaur/salad/container.yaml | |||
|
|||
At this point, you should open up the container.yaml generated and edit to your liking. | |||
The container image will be copied within the newly-created directory structure, alongside the `container.yaml` file. |
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.
More specifically, it will be put in container_base
that could be a custom path specified by the user:
singularity-hpc/shpc/settings.yml
Line 43 in 2a2e30c
container_base: $root_dir/containers |
Also, if they create a module with a local path defined (example here) the container will not be copied, but rather preserved in that path (and referenced as such in the container.yaml). We do this for use cases where you have a huge archive of existing containers, and just want to make separate modules for them.
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.
@vsoch thanks for the explanation, I like these features. When you say
if they create a module with a local path defined
You mean creating the container.yaml
manually, and NOT using the shpc add ...
command. Is that correct? Because using the shpc add
command creates a copy by default?
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.
No, the example I linked is using the same logic as shpc add, but from within Python to specify a specific container path to write into the container.yaml recipe and not do a copy.
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.
So this is something you can do programmatically using SHPC as a Python module, but is there a way to enable keep_path
through the shpc
command line tool?
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.
Not currently - it’s just provided as that example right now.
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.
I haven't tested closely, but here is something to try! #656 I both exposed keep_path to add, and also enforced using container_base.
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.
That is great, looks correct to me. When will it be merged? So I can update this PR accordingly.
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.
@dipietrantonio I was hoping you might test out the two changes?
- add with a custom container path
- fixing the bug to honor container_base
When you've confirmed it works as expected we can merge.
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.
I would suggest merging this PR as it actually describes what happens. Then change the documentation again when you fix the bug.
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.
I'm fine with that, thanks!
Make it clear that the container image is bundled with the recipe when adding a local container.
Make it clear that the container image is bundled with the recipe when adding a local container.
This pull request addresses singularityhub/shpc-registry#113