Skip to content

docker: add OCI image labels for version and build date#21653

Merged
CISC merged 4 commits into
ggml-org:masterfrom
ssam18:docker/oci-image-labels
May 18, 2026
Merged

docker: add OCI image labels for version and build date#21653
CISC merged 4 commits into
ggml-org:masterfrom
ssam18:docker/oci-image-labels

Conversation

@ssam18
Copy link
Copy Markdown
Contributor

@ssam18 ssam18 commented Apr 9, 2026

Running a container and not knowing which version you're on is a frustrating experience, especially when trying to decide whether to pull a newer image. This adds org.opencontainers.image.created and org.opencontainers.image.version labels to all published Docker images, populated from the build timestamp and the existing version tag generated during CI. Users can now run docker inspect <image> to instantly see what version they're running. Fixes #21645

@ssam18 ssam18 requested review from a team and ngxson as code owners April 9, 2026 02:21
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 9, 2026

heads up! The labeler failure is not from this PR, it is a broken config in labeler.yml that's been failing on every PR. fix is included here, just needs a merge.

Copy link
Copy Markdown
Member

@taronaeo taronaeo left a comment

Choose a reason for hiding this comment

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

Seems like a good addition to me :)

Comment thread .github/labeler.yml
@candrews
Copy link
Copy Markdown

candrews commented Apr 9, 2026

Can you also some other image labels?

These labels are documented at https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys They're useful for both people to use manually and for automated systems to use (for example, Renovate uses this information to create better PR descriptions).

@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from e3053a7 to 8064797 Compare April 9, 2026 14:13
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Apr 9, 2026
Copy link
Copy Markdown
Member

@CISC CISC left a comment

Choose a reason for hiding this comment

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

Add id: checkout to the checkout step so we can get the right SHA.

Please provide a successful run of the job (disable s390x).

Comment thread .github/workflows/docker.yml Outdated
Comment thread .github/workflows/docker.yml Outdated
Comment thread .github/workflows/docker.yml Outdated
Comment thread .devops/cann.Dockerfile Outdated
@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from 8064797 to b973ae5 Compare April 9, 2026 20:51
EZForever added a commit to EZForever/llama.cpp-static that referenced this pull request Apr 21, 2026
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 21, 2026

can we merge this PR?

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 21, 2026

can we merge this PR?

Where's the successful run?

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 22, 2026

Successful run here: https://github.com/ssam18/llama.cpp/actions/runs/24752990085

Triggered from a throwaway branch off this PR with the s390x matrix entry removed (since the s390x runner isn't available on the fork). The PR branch itself is unchanged.

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 22, 2026

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 22, 2026

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 23, 2026

The labels don't seem to be applied: https://github.com/ssam18/llama.cpp/pkgs/container/llama.cpp/812998280?tag=server-vulkan-ci-oci-labels-test-run-b8739-71dfdce

please check now.

You forgot to disable s390x.

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 23, 2026

The labels don't seem to be applied: https://github.com/ssam18/llama.cpp/pkgs/container/llama.cpp/812998280?tag=server-vulkan-ci-oci-labels-test-run-b8739-71dfdce

please check now.

You forgot to disable s390x.

Thanks for calling that out. The earlier test image only had the Dockerfile LABEL changes, and GHCR does not show those on the package page because they live in the image config. The follow-up commit is the one that propagates the OCI metadata to the manifest and multi-arch index, which is what GHCR actually displays. Also, s390x was removed only on the temporary test branch to work around fork runner limits; the PR branch intentionally keeps it unchanged.

@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from efc0228 to 49c762f Compare April 23, 2026 23:42
@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from 49c762f to 699547c Compare May 16, 2026 19:43
@ssam18 ssam18 requested review from CISC and taronaeo May 16, 2026 19:44
Copy link
Copy Markdown
Member

@taronaeo taronaeo left a comment

Choose a reason for hiding this comment

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

Thanks for pinging again.

While this is a good addition to identify problematic versions, org.opencontainers.image.url should not be hardcoded to ggml-org/llama.cpp as forks can also run the same workflow. org.opencontainers.image.url should be pointing to the forked repository instead. Likewise for org.opencontainers.image.source.

Comment thread .devops/intel.Dockerfile Outdated
The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented May 17, 2026

Thanks for the review. Pushed a fix that makes the OCI url and source come from a build arg so the workflow can pass the actual repository url, which means forks running this workflow will get labels pointing at their own fork. Also reverted the intel runtime versions back to upstream values since the bump was unrelated to this change.

Copy link
Copy Markdown
Member

@taronaeo taronaeo left a comment

Choose a reason for hiding this comment

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

Wait for @CISC's review.

Copy link
Copy Markdown
Member

@CISC CISC left a comment

Choose a reason for hiding this comment

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

Can we get a test run (without s390x)?

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented May 18, 2026

Test run done on the fork with skip_s390x=true, all 14 jobs green.

Run https://github.com/ssam18/llama.cpp/actions/runs/26034918114

Added a skip_s390x boolean input to workflow_dispatch in 823937f so this kind of quick test run does not have to wait for the IBM Z runner. The filter is applied to the matrix JSON before merge_matrix is derived, so the merge job sees a consistent shape too.

Confirmed the OCI annotations actually land on the resulting manifest index, here is the vulkan server tag for reference

org.opencontainers.image.created  = 2026-05-18T14:24:04Z org.opencontainers.image.description = LLM inference in C/C++ org.opencontainers.image.revision = 823937f06b7d6374026f0991f962650103ee4f99
org.opencontainers.image.source   = https://github.com/ssam18/llama.cpp
org.opencontainers.image.title    = llama.cpp
org.opencontainers.image.url      = https://github.com/ssam18/llama.cpp
org.opencontainers.image.version  = docker-oci-image-labels-b9193-823937f

@CISC CISC merged commit 5cbaa5e into ggml-org:master May 18, 2026
3 checks passed
Jcfunk added a commit to Jcfunk/llama.cpp that referenced this pull request May 19, 2026
* master: (100 commits)
  Agent update
  hexagon: add support for TRI op (ggml-org#22822)
  ggml-hexagon: add PAD op HVX kernel (ggml-org#23078)
  docker : add OCI image labels for version and build date (ggml-org#21653)
  common : remove hf cache migration (ggml-org#23266)
  ui: Update KaTeX package and clean up logs from `sass` warnings (ggml-org#23275)
  feat: add scroll-to-bottom button to chat + prevent forced scroll down (ggml-org#23270)
  ui: Refactor models store, MCP service, and gate logs behind VITE_DEBUG (ggml-org#23236)
  ui: Centralize monospace font styles in app.css (ggml-org#23272)
  webui: fix Tailwind v4 utility classes missing when built via cmake (ggml-org#23253)
  llama: initialize pre-norm embedding mask flag (ggml-org#23256)
  add myself to conversion (ggml-org#23261)
  ci : added kleidiai-server to server-self-hosted workflow (ggml-org#22435)
  scripts : allow wc2wt with an existing branch (ggml-org#23189)
  sycl: scalar SWAR byte-subtract in Q6_K MMVQ dot product (ggml-org#22156)
  sycl: route small f32 matmuls to oneMKL, bypass oneDNN (ggml-org#22150)
  sycl : fix error when use -mg 1 error (ggml-org#23140)
  update bid to match each layers MTP source (ggml-org#23237)
  cmake : do not check for bin install dir (ggml-org#23234)
  feat: Support d_conv=15 for ssm-conv.cu (ggml-org#23017)
  ...
kgrama pushed a commit to kgrama/llama.cpp that referenced this pull request May 19, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
xxmustafacooTR pushed a commit to xxPlayground/llama-cpp-turboquant that referenced this pull request May 19, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 19, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
ArberSephirotheca pushed a commit to ArberSephirotheca/llama.cpp that referenced this pull request May 19, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
fhnmor21 pushed a commit to fhnmor21/llama-cpp-turboquant that referenced this pull request May 19, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
dbrain pushed a commit to dbrain/hbd-llama-cpp-turboquant that referenced this pull request May 21, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
srossitto79 pushed a commit to srossitto79/llama.cpp that referenced this pull request May 23, 2026
)

* docker: add OCI image labels to all published images

* docker: propagate OCI labels as manifest and index annotations

* docker: drop hardcoded org URL and revert accidental intel version bump

The OCI image url and source are now driven by build args with a sensible default. The workflow passes the actual repository url so fork builds get labels pointing at the fork instead of upstream. Also restores the IGC, compute runtime, and IGDGMM versions in the intel Dockerfile labeled stage which I accidentally bumped in the first commit.

* docker: add skip_s390x workflow_dispatch input for fast test runs

Lets maintainers and PR authors trigger the docker workflow without the s390x build target, which depends on the IBM Z runner and is by far the slowest job in the matrix. The flag filters the s390x row out of the build matrix before merge_matrix is derived, so the merge job sees a consistent shape too.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>

---------

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: It would be great if the docker image contained a label with the version number

4 participants