singularityhub / singularityhub.github.io

Container tools for scientific computing! Docs at https://singularityhub.github.io/singularityhub-docs
https://singularityhub.github.io
68 stars 9 forks source link

How to build several containers from a single repository? #116

Closed stevekm closed 6 years ago

stevekm commented 6 years ago

Link to Container Collection Log, Build, or Collection (in that order)

Singularity: https://www.singularity-hub.org/collections/730

Docker: https://hub.docker.com/r/stevekm/ngs580-nf/tags/

What do you think is going on?

On Docker Hub, I have several containers for a single repository. How can I set up the same configuration on Singularity Hub?

Screenshots of setup on Docker Hub & Singularity Hub for comparison; Singularity Hub does not appear to have an option for multiple containers on a single repository? Is there some other way to configure this?

Docker Hub:

screen shot 2018-03-14 at 4 55 58 pm

Singularity Hub:

screen shot 2018-03-14 at 4 56 19 pm
vsoch commented 6 years ago

Hey @stevekm ! It's much simpler than that - the recipes are discovered in the repository as any file with a Singularity. prefix. The extension is the tag of the image, and no extension builds latest. The folder location is irrelevant, and in the case of duplicates, the most recent file is used. For example:

Singularity --> username/container:latest
folder/Singularity.tag --> username/container:tag

You would only need to go into specifying an actual file if you change your collection to build manually, and then trigger (and it asks you for the path to the Singularity recipe to use).

There is detailed documentation on this, please suggest changes if anything is not clear

https://github.com/singularityhub/singularityhub.github.io/wiki/Build-A-Container#naming-recipes

stevekm commented 6 years ago

Hey Vanessa, to make my life easier I started packing my commands for Singularity inside a file called Singularity.makefile in my repo; I just realized that this might get picked up automatically by the container builder due to the file name. Is there a way to avoid this?

vsoch commented 6 years ago

Yes you would want to switch to manual builds, and then not build it.

vsoch commented 6 years ago

or name your makefile something different of course!

vsoch commented 6 years ago

I'm going to close this issue, I don't think there is a problem and the file naming issue is resolved. Please let me know if you are still having trouble.