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

Missing labels / container build recipes are not populated #439

Open
YStrauchP4 opened this issue Aug 21, 2023 · 6 comments
Open

Missing labels / container build recipes are not populated #439

YStrauchP4 opened this issue Aug 21, 2023 · 6 comments

Comments

@YStrauchP4
Copy link

Describe the bug
When uploading container images, the recipe is not populated and the interface states "Container does not have recipe locally."
As a consequence, labels / env vars are not populated either.
Apologies if there's a dedicated step I need to do in order to upload the build recipes but I did not find documentation on this.

To Reproduce

container.def

BootStrap: docker
From: python:3.10-slim

%environment
   export python="3.10.0"

%labels
   Author Test Author

Then apptainer build container.sif container.def followed by a sregistry push --name container container.sif

Expected behavior
When inspecting the container using sregistry inspect or in the browser, I'd expect the python label and/or author to show up. Similar, I'd expect the "labels" tab (/labels) to show the python version and/or author.

Versions:
Sregistry 2.1.0
Apptainer 1.1.8
Docker version 23.0.0, build e92dd87

@vsoch
Copy link
Member

vsoch commented Aug 21, 2023

The sregistry command is no longer the primary means to interact with singularity registry - you typically use the library:// endpoint.

@YStrauchP4
Copy link
Author

YStrauchP4 commented Aug 22, 2023

Okay so new workflow, same result.

To Reproduce
container.def

BootStrap: docker
From: python:3.10-slim

%environment
   export python="3.10.0"

%labels
   Author Test Author

Then apptainer build container.sif container.def followed by a apptainer push -U container.sif library://ystrauchp4/new/container:latest

Expected behavior
In the browser, I expected /labels and /tags to show new info after uploading the container, as defined in the environment and/or labels of the recipe.
The page for the container itself states "Container does not have recipe locally."

How do I attach the build recipe?

@vsoch
Copy link
Member

vsoch commented Aug 22, 2023

Normally the recipe is part of the metadata of the image, and I think labels used to come from either the sregistry push, or when you connected a GitHub repository.

This project is fairly old, and I think what I'd recommend is to push these to an OCI registry, and make a separate artifact that can hold (and expose) the container metadata (unless apptainer has removed it, should be there with apptainer inspect). We could add views here to receive the same metadata, but imho it's not the best approach to have to maintain your own registry.

@vsoch
Copy link
Member

vsoch commented Aug 22, 2023

Do you want to tell me your use case and I can help think about a solution using ORAS?

@YStrauchP4
Copy link
Author

I want to build a private container repository that holds sif files and matching metadata (especially software versions) that clients can query and filter (i.e. give me all sif files containing python 3.8 and software X in version Y).

I hoped to generate this version metadata by using environment variables or labels in the recipe; it looked like the REST interface could search over the metadata and provide an easy point to query versions. Shame this project seems to not be under active development anymore.

@vsoch
Copy link
Member

vsoch commented Aug 22, 2023

I’m happy to receive contributions via PR! I maintain hundreds of projects plus my day job, and if a solution comes around that is better (in my opinion) than something I’ve maintained in the past, it doesn’t make sense to keep maintaining it. I’m just one person.

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