Skip to content

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

Open

Description

@Trophime

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

Activity

  1. vsoch commented on Jul 7, 2022

    @vsoch
    Member

    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.

  2. Trophime commented on Jul 7, 2022

    @Trophime
    Author

    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?

  3. vsoch commented on Jul 7, 2022

    @vsoch
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions