conda / ceps

Conda Enhancement Proposals
Creative Commons Zero v1.0 Universal
20 stars 24 forks source link

CEP request: OCI packaging #69

Open jaimergp opened 5 months ago

jaimergp commented 5 months ago

https://github.com/orgs/channel-mirrors/packages has a mostly complete mirror of conda-forge and bioconda in GHCR.io. Each anaconda.org artifact (be it tar.bz2 .conda), has been pushed there under the following conventions:

For each name+label combo, we have the following manifest of layers:

{
  "digest": "sha256:<hash>",
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "size": <size in bytes>,
  "config": {
    "digest": "sha256:<hash>",
    "mediaType": "application/vnd.unknown.config.v1+json",
    "size": <size in bytes>
  },
  "layers": [
    {
      "digest": "sha256:<hash>",
      "mediaType": "application/vnd.oci.image.layer.v1.tar",
      "size": <size in bytes>
    },
    {
      "digest": "sha256:<hash>",
      "mediaType": "application/vnd.conda.package.v2",
      "size": <size in bytes>
    },
    {
      "digest": "sha256:<hash>",
      "mediaType": "application/vnd.conda.info.v1.tar+gzip",
      "size": <size in bytes>
    },
    {
      "digest": "sha256:<hash>",
      "mediaType": "application/vnd.conda.info.index.v1+json",
      "size": <size in bytes>
    }
  ]
}

I think the tar and conda layers correspond to tar.bz2 and .conda ones. Always present, but only one is populated. The info layers correspond to the compressed info/ contents and the info/index.json file, respectively.

This should be standardized in a CEP.