Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

labels for Singularity (scientific containers) #32

Open
vsoch opened this issue Jul 25, 2017 · 3 comments
Open

labels for Singularity (scientific containers) #32

vsoch opened this issue Jul 25, 2017 · 3 comments

Comments

@vsoch
Copy link

vsoch commented Jul 25, 2017

hey label-schema team! I'm one of the developers for Singularity (http://singularity.lbl.gov) which is a container that is primarily for HPC and science (doesn't have security risks of Docker). I've seen your schema used for some Docker containers, and would be interested to follow suit for Singularity. Right now our default metadata labels are rather general:

singularity inspect --json centos-7.img
{
    "data": {
        "attributes": {
            "labels": {
                "build-date": "20170605",
                "vendor": "CentOS",
                "name": "CentOS Base Image",
                "license": "GPLv2"
            }
        },
        "type": "container"
    }
}

the above outputs the JSON API spec, but the labels itself is just a flat dictionary:

singularity inspect centos-7.img
 {
    "build-date": "20170605",
    "vendor": "CentOS",
    "name": "CentOS Base Image",
    "license": "GPLv2"
}

We are adding modular application support for inside the images, and in addition to a structural format, since we will have labels for each internal module (and the container) it would be really great to have standard labels! This might also help issue #31. What are your thoughts? What is the process we could go about this? What I would propose to do is make a first pass at a set of singularity labels here --> https://docs.google.com/document/d/1k0I1M1BIR1aqGxVVJrow_Gj3T8BXHco-oqnreYKuxL8/edit?usp=sharing (this is the document we are working on the internal structure) and then if you like, I can PR something here? Do you have a spec / definitions outside of this repo?

Generally, scientists need more information about container metrics that are important for reproducibility. This would mean things like software versioning and hardware intended for, some metadata about the authors possibly, and labels specific to the modules inside (and this is a hard territory to venture into, but also workflow type things like inputs and outputs). The goal would be to find a container, know how it was made, what it is intended for and how to run it,and then be able to do so.

Looking forward to chatting with you!

@vsoch
Copy link
Author

vsoch commented Jul 29, 2017

hi label schema!

We have a PR under way ( apptainer/singularity#843 apptainer/singularity#831) to add labels per the first specification using label-schema, specifically a bootstrap image looks like this:

 singularity inspect dino.img
{
    "org.label-schema.usage.singularity.deffile.bootstrap": "docker",
    "MAINTAINER": "Vanessasaurus",
    "org.label-schema.usage.singularity.deffile": "Singularity.help",
    "org.label-schema.usage": "/.singularity.d/runscript.help",
    "org.label-schema.schema-version": "1.0",
    "org.label-schema.usage.singularity.deffile.from": "ubuntu:latest",
    "org.label-schema.build-date": "2017-07-28T21:57:15-04:00",
    "org.label-schema.usage.singularity.runscript.help": "/.singularity.d/runscript.help",
    "org.label-schema.usage.singularity.version": "2.3.1-add/label-schema.gefbf35f"
}

Does that look reasonable, or do you have suggestions for improvement? And the final question before we merge is if there anywhere / anything we need to do in order to document usage in our containers. This will be merged into development branch, and go out with release of 2.4. Thanks!

@vsoch
Copy link
Author

vsoch commented Jan 24, 2018

Is this repository being maintained? I posted this issue summer of last year, and no one has responded... we are wanting to add an imagetype label and it would really be helpful if someone that maintains the specification could give some basic guidance. Thank you!

apptainer/singularity#1268

@lizrice
Copy link
Contributor

lizrice commented Jan 24, 2018

Hi @vsoch, the label schema work is now part of the OCI: https://github.com/opencontainers/image-spec

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants