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

sregistry with sif images on Gitlab api/v4 #351

Open
thdesy opened this issue Mar 11, 2021 · 1 comment
Open

sregistry with sif images on Gitlab api/v4 #351

thdesy opened this issue Mar 11, 2021 · 1 comment

Comments

@thdesy
Copy link

thdesy commented Mar 11, 2021

Hi,

I have attached sregistry to our local gitlab instance and can browse my build artifacts [1]. However, pulling an image file from the artifacts fails with [2].
As far as I see, the problem is, that the clients tries to read a *.simg, while I had been building *sif's with Singularity 3. I already tried to change the name accordingly [3] but without success. Requesting the file works in principle [4].

Unfortunately, I did not find the API definitions, so that I could try to patch the request.

Cheers and thanks,
Thomas

[1]

> ~/.local/bin/sregistry search thomas.hartmann/singularitybuilder
[client|gitlab] [database|sqlite:///${HOME}/.singularity/sregistry.db]
Artifact Browsers (you will need path and job id for pull)
1  job_id	browser
2  14322	https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14322/artifacts/browse/build
3  14319	https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14319/artifacts/browse/build

[2]

> ~/.local/bin/sregistry pull --debug  14322,thomas.hartmann/singularitybuilder
[client|gitlab] [database|sqlite://${HOME}/.singularity/sregistry.db]
Looking for artifact build/Singularity.simg for job name build, 14322
https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14322/artifacts/raw/build/Singularity.simg/?inline=false
ERROR Invalid url or permissions https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14322/artifacts/raw/build/Singularity.simg/?inline=false
ERROR Cannot find ${HOME}/.singularity/shub/library/singularitybuilder/thomas.hartmann/:latest.sif

[3]

> ~/.local/bin/sregistry pull --name Singularity.sif 14322,thomas.hartmann/singularitybuilder 
[client|gitlab] [database|sqlite:///${HOME}/.singularity/sregistry.db]
Looking for artifact build/Singularity.simg for job name build, 14322
https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14322/artifacts/raw/build/Singularity.simg/?inline=false
ERROR Invalid url or permissions https://gitlab.desy.de/thomas.hartmann/singularitybuilder/-/jobs/14322/artifacts/raw/build/Singularity.simg/?inline=false
ERROR Cannot find Singularity.sif

[4]
curl -L -s --header "PRIVATE-TOKEN: ${SREGISTRY_GITLAB_TOKEN}" "https://gitlab.desy.de/api/v4/projects/588/jobs/14300/artifacts/build/Singularity.sif" -o /tmp/foo.sif

@vsoch
Copy link
Member

vsoch commented Mar 11, 2021

Are you using Singularity Registry server, or the sregistry client (which is at https://github.com/singularityhub/sregistry-cli). They are different. You should look at the gitlab section in there and open a PR if there is a bug. And if [4] works, why not just use that?

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

No branches or pull requests

2 participants