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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/getting_started/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,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!

At this point, you should open up the generated `container.yaml` file and edit to your liking.
This usually means updating the description, maintainer, aliases, and possibly providing a url
to find more information or support. Also notice we've provided the tag to be latest. If you update this registry
entry in the future with a new version, you'll want to provide a new tag. If you provide
Expand Down
Loading