apptainer / singularity

Singularity has been renamed to Apptainer as part of us moving the project to the Linux Foundation. This repo has been persisted as a snapshot right before the changes.
https://github.com/apptainer/apptainer
Other
2.53k stars 424 forks source link

Singularity pull doesn't support hyphens or underscores #1433

Closed gkiar closed 6 years ago

gkiar commented 6 years ago

Version of Singularity:

2.4.1

Expected behavior

That singularity pull shub://myname/my-image and singularity pull shub://myname/my_image would be pulled successfully, just like singularity pull shub://myname/myimage

Actual behavior

When pulling In the case of the image stored here, for example (though this is consistent for any image with a - or _ I've tested):

$ singularity pull shub://BIDS-Apps/ndmg
ERROR Cannot find image. Is your capitalization correct?

This is also true of Docker names with these symbols. My current workaround is to not have hyphens in my image names, though this is not ideal for the sake of name clarity. Thanks for your continued help @vsoch and others!

vsoch commented 6 years ago

If you don't specify a tag, it defaults to latest. Your repository doesn't have a latest, because you've defined a specific tag v0.1.0 via the extension of your Singularity file. Try:

$ singularity pull shub://BIDS-Apps/ndmg:v0.1.0
Progress |===================================| 100.0% 
Done. Container is at: /home/vanessa/BIDS-Apps-ndmg-master-v0.1.0.simg

The commands page for the collection doesn't give a specific tag, as it is a general instruction for pulling the collection (with many). Hope that helps!

gkiar commented 6 years ago

Hilariously, I think I've always been trying on images without a latest tag! Geeze, sorry about my brain fart and thank you :)

salammemphis commented 5 years ago

Hi, I have set up the "sregistry" singularity registry hub locally and trying to pull an image and stuck with following problems. any suggestion? Should I build HTTPs for this hub?

singularity -d pull shub://XXXXXXXXX/hellorepo/helloworld:latest

DEBUG * STARTING SINGULARITY PYTHON PULL ** VERBOSE2 SINGULARITY_CONTAINER found as shub://XXXXXXXXX/hellorepo/helloworld VERBOSE2 SINGULARITY_PULLFOLDER found as . DEBUG Found uri shub:// DEBUG Headers found: Accept,Content-Type DEBUG GET https://XXXXXXXXX/api/container/hellorepo/helloworld:latest DEBUG Http Error with code 404 ERROR Cannot find image. Is your capitalization correct?

Thank you

salam

vsoch commented 5 years ago

I don't think it's an issue with hyphens - the client doesn't seem to (yet) support custom registries. Also - I think you are using a (very old) version of Singularity if there is still Python involved :)

For the newer version of Singularity (GoLang) the issue you want to look at is here:

https://github.com/sylabs/singularity/issues/2819

For the older Singularity, I don't think they are doing bug fixes, so you can either update Singularity, or if that's really impossible, see the curl tricks in the link above, or use sregistry client.

And regardless, YES you should add HTTPS! :)