Skip to content

[Feature] Add OCI Image Annotations to container images#37678

Open
JMonde wants to merge 1 commit into
vllm-project:mainfrom
JMonde:feature/oci-container-annotations
Open

[Feature] Add OCI Image Annotations to container images#37678
JMonde wants to merge 1 commit into
vllm-project:mainfrom
JMonde:feature/oci-container-annotations

Conversation

@JMonde
Copy link
Copy Markdown

@JMonde JMonde commented Mar 20, 2026

Summary

This PR adds standard OCI Image Annotations to all vLLM Dockerfiles, improving container image metadata for registries and tooling.

Changes

Added OCI-compliant LABEL instructions to the following Dockerfiles:

  • Dockerfile (CUDA) - org.opencontainers.image.* annotations
  • Dockerfile.cpu - Enhanced existing annotations with complete OCI spec
  • Dockerfile.rocm - Added full OCI annotations
  • Dockerfile.xpu - Added full OCI annotations
  • Dockerfile.ppc64le - Added full OCI annotations

Annotations Added

Each image now includes:

Annotation Value
org.opencontainers.image.title vLLM [variant]
org.opencontainers.image.description Platform-specific description
org.opencontainers.image.url https://vllm.ai
org.opencontainers.image.source https://github.com/vllm-project/vllm
org.opencontainers.image.vendor vLLM Project
org.opencontainers.image.licenses Apache-2.0

Benefits

  1. Registry Integration: Container registries (GHCR, Docker Hub, ECR, etc.) can display rich metadata
  2. Security & Compliance: Automated tools can verify source and license information
  3. SBOM Generation: Software Bill of Materials tools use OCI annotations for provenance
  4. Discoverability: Better search and categorization in container registries
  5. Standards Compliance: Follows OCI Image Format Specification v1.0

Example

After building, the image metadata will show:

$ docker inspect vllm/vllm-openai:latest | jq '.[0].Config.Labels'
{
  "org.opencontainers.image.title": "vLLM",
  "org.opencontainers.image.description": "A high-throughput and memory-efficient inference and serving engine for LLMs",
  "org.opencontainers.image.url": "https://vllm.ai",
  "org.opencontainers.image.source": "https://github.com/vllm-project/vllm",
  "org.opencontainers.image.vendor": "vLLM Project",
  "org.opencontainers.image.licenses": "Apache-2.0"
}

Related

Fixes: #32674

@mergify mergify Bot added ci/build rocm Related to AMD ROCm labels Mar 20, 2026
@mergify mergify Bot added the cpu Related to CPU backends label Mar 20, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Mar 20, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces standard OCI image annotations to all vLLM Dockerfiles, which is a great improvement for image metadata and tooling integration. The changes are consistent across the different Dockerfiles. However, I've identified a high-severity issue where the labels defined in docker/docker-bake.hcl will override the new annotations in docker/Dockerfile during bake builds, leading to inconsistent metadata. My review includes a comment to address this discrepancy.

Comment thread docker/Dockerfile
Comment on lines +497 to +502
LABEL org.opencontainers.image.title="vLLM" \
org.opencontainers.image.description="A high-throughput and memory-efficient inference and serving engine for LLMs" \
org.opencontainers.image.url="https://vllm.ai" \
org.opencontainers.image.source="https://github.com/vllm-project/vllm" \
org.opencontainers.image.vendor="vLLM Project" \
org.opencontainers.image.licenses="Apache-2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While these labels are a great addition for standard docker build commands, they will be overridden by the labels defined in docker/docker-bake.hcl when using docker buildx bake. The labels in docker-bake.hcl are currently inconsistent with the changes in this PR.

Specifically, in docker/docker-bake.hcl:

  • org.opencontainers.image.url is missing.
  • org.opencontainers.image.vendor is set to "vLLM" instead of "vLLM Project".
  • org.opencontainers.image.description has a vLLM: prefix that is not present here.

To ensure consistency across all build methods, please update the _labels target in docker/docker-bake.hcl to match these new annotations. This will ensure that bake builds have the same rich metadata.

@mergify mergify Bot added the intel-gpu Related to Intel GPU label Mar 27, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 31, 2026

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @JMonde.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @JMonde.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build cpu Related to CPU backends intel-gpu Related to Intel GPU needs-rebase rocm Related to AMD ROCm

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[Feature][P1]: Add OCI Annotations to container images

1 participant