Open YStrauchP4 opened 1 year ago
The sregistry command is no longer the primary means to interact with singularity registry - you typically use the library:// endpoint.
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?
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.
Do you want to tell me your use case and I can help think about a solution using ORAS?
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.
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.
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
Then
apptainer build container.sif container.def
followed by asregistry 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