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

Is it possible to view singularity images as oras://ghcr.io/ in github packages #16

Open
Trophime opened this issue Jul 7, 2022 · 3 comments

Comments

@Trophime
Copy link

Trophime commented Jul 7, 2022

Hi,
following your GREAT workflow I've managed to create a singularity image for my project and upload it to ghcr.io.
I still have some issues:

  • it seems that the package is advertised as a "docker image" in my project package page from github:

Install from the command line:
Learn more
$ docker pull ghcr.io/feelpp/salome.docker:latest

How can I tell github to display a more appropriate message like: singularity pull oras://....

  • Next as my project is private I need to pass some credentials to pull the singularity image. How can do that?

Thanks for your help

@vsoch
Copy link
Member

vsoch commented Jul 7, 2022

awesome! So the GitHub packages interface is incorrect for different artifact types - whatever you put up on there it's going to show that Docker command (so safe to ignore it). What you want to do instead is:

singularity pull oras://ghcr.io/feelpp/salome.docker:latest

And unfortunately I don't know any way to change that page - perhaps we should ping GitHub to request better support for that?
If your project is private (but you have permission) you'll need to use oras login first with a GitHub personal access token.

@Trophime
Copy link
Author

Trophime commented Jul 7, 2022

Indeed, that would be great to tell docker image from singularity in the packages.

As for the pull operation, actually, I've already tried something like that:

  • generate a PAT,
  • and run:
    echo token | singularity remote login -u Trophime --password-stdin oras://ghcr.io
    But it keeps saying:
    FATAL: while login to oras://ghcr.io: Get "https://ghcr.io/v2/": denied: denied

Maybe I've not selected the right items for the PAT. Any idea which items I should check in the list?

@vsoch
Copy link
Member

vsoch commented Jul 7, 2022

I would check that:

  1. your PAT has packages permission enabled (it's an extra permission)
  2. you are added to the container with permission to pull

I typically just use public repos / packages but I remember running into this and it seemed to me the message was correct - the PAT I provided didn't have permission to do the pull.

Another way to debug is outside of singularity - install the oras client (https://oras.land) and then do just

oras login (same as docker login)
oras pull -a <artifact>

Once you get that working, then go back to Singularity (and check the permissions first anyway!)

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