singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

Unable to pull Container: 404 not found #189

Closed ArjitM closed 5 years ago

ArjitM commented 5 years ago

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

https://www.singularity-hub.org/containers/7921/log

Behavior when Building Locally

None

Error on Singularity Hub

I am unable to pull the container image locally it seems as though it can't find the container, although the log doesn't show any errors. I have tried using the container ID, uri, and other identifiers but nothing seems to work With sregistry:

$ sregistry pull shub://ArjitM/CellMorphology
WARNING Singularity is not installed, function might be limited.
WARNING Singularity is not installed, function might be limited.
WARNING hub is not a recognized uri.
[client|hub] [database|sqlite:////Users/arjitmisra/.singularity/sregistry.db]
ERROR Beep boop! Not Found: 404

With singularity: singularity pull shub://7921 ERROR Cannot find image. Is your capitalization correct?

I'm still very new to Singularity; I appreciate any help!

vsoch commented 5 years ago

If you don't specify a tag, it defaults to latest. You don't have a latest, so the error message is correct. Try specifying a tag that you do have:

$ singularity pull shub://ArjitM/CellMorphology:cellprof2
vsoch commented 5 years ago

From your GitHub repo, the tag is the extension of the Singularity recipe file. You can also see them listed in the container collection table.

ArjitM commented 5 years ago

Thanks for the quick feedback. It works now with singularity, but not with sregistry. Anyhow, it solves my issue!

vsoch commented 5 years ago

Oup, that's a bug! I'll transfer the issue over there and take a look tomorrow.

vsoch commented 5 years ago

Good news @ArjitM ! I've found the bug. The issue is the capitalization - and it's funny because you are the first to hit this with the sregistry client. The client lowercases all the URIs, assuming the Docker Hub standard. Singularity doesn't, and sregistry client shouldn't either. The client is asking for this url:

https://www.singularity-hub.org/api/container/arjitm/cellmorphology:cellprof2

And the correct url has the same capitalization:

https://www.singularity-hub.org/api/container/ArjitM/CellMorphology:cellprof2

I'll have a fix for you to test shortly!