Skip to content
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

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

dipietrantonio
Copy link
Contributor

@dipietrantonio dipietrantonio commented Jun 24, 2023

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

@@ -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.
Copy link
Member

@vsoch vsoch Jun 24, 2023

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:

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.
@vsoch vsoch merged commit b215a3b into singularityhub:main Nov 15, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants