ramalama icon indicating copy to clipboard operation
ramalama copied to clipboard

`org.opencontainers.image.title` hard-coded to `args.SOURCE`

Open mtrmac opened this issue 6 months ago • 5 comments

https://github.com/containers/ramalama/blob/9df9532ed47ebbc4644d175b352cba2710654087/ramalama/oci.py#L306

causes the local OCI manifests to be configured with, e.g.

# podman manifest inspect localhost:5000/smollm-converted
{
…
            "annotations": {
…
                "org.opencontainers.image.title": "args.SOURCE"
            }
        }
    ]
}

That’s presumably unintended, although, also, it might not make any difference to anything; ramalama push pushes only the single image referenced in the manifest, not the manifest with these annotations.

mtrmac avatar Jun 18 '25 17:06 mtrmac

What should we be doing in this case? Care to open a PR to fix?

rhatdan avatar Jun 20 '25 10:06 rhatdan

I brought this up before, but I believe we should default to what Docker is doing:

https://www.docker.com/blog/why-docker-chose-oci-artifacts-for-ai-model-packaging/

it's fine. It could be easily extended to multi-modal (and vllm). Multi-modal gguf could be as simple as adding a "application/vnd.docker.ai.mmproj.v3" layer to this:

{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "config": {
    "mediaType": "application/vnd.docker.ai.model.config.v0.1+json",
    "size": 372,
    "digest": "sha256:22273fd2f4e6dbaf5b5dae5c5e1064ca7d0ff8877d308eb0faf0e6569be41539"
  },
  "layers": [
    {
      "mediaType": "application/vnd.docker.ai.gguf.v3",
      "size": 2489757856,
      "digest": "sha256:09b370de51ad3bde8c3aea3559a769a59e7772e813667ddbafc96ab2dc1adaa7"
    },
    {
      "mediaType": "application/vnd.docker.ai.license",
      "size": 8346,
      "digest": "sha256:a4b03d96571f0ad98b1253bb134944e508a4e9b9de328909bdc90e3f960823e5"
    }
  ]
}

it already works with podman artifact, they are compatible with vanilla llama.cpp and they have several models available in this format already.

ericcurtin avatar Jun 20 '25 11:06 ericcurtin

What should we be doing in this case?

*shrug* does anything consume that annotation? In the very first version, the annotation name was org.cnai.model.title, and that was changed later. That also suggests that the annotation might not really matter.

https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys says “Human-readable title of the image”. Read pedantically and ambitiously, a “human-readable title” is not obviously something a tool can figure out just from file names and paths, or repo:tag locations.

[I don’t feel strongly at all about what happens here. It seems quite possible that that sweating these things is nowhere near the top of the list. I just wanted to file this in case it were important for some reason.]


https://www.docker.com/blog/why-docker-chose-oci-artifacts-for-ai-model-packaging/

I’m naive and ignorant about Ramalama, but I don’t see how that relates at all. This report is about are annotations on the OCI indices used only locally, to wrap the actual model images — AFAICT the indices exist only to “mark” AI images among all the images that exist in Podman storage, for easier / more correct ramalama ls. These OCI indices, and therefore these annotations, are not currently pushed to a registry.

[And if you wanted to change that, there should be other changes, e.g. the org.cnai.model.model annotation has been removed from the relevant upstream specification, AFAICS, and is being applied in a way that does not follow that specification. And the index probably should not carry a platform specification.]

mtrmac avatar Jun 20 '25 14:06 mtrmac

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jul 24 '25 00:07 github-actions[bot]

Not stale

rhatdan avatar Aug 26 '25 12:08 rhatdan

This has been fixed for a while.

rhatdan avatar Dec 13 '25 13:12 rhatdan