Skip to content

Commit e03e9f2

Browse files
ssam18rsenthilkumar6
authored andcommitted
docker : add OCI image labels for version and build date (ggml-org#21653)
* 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>
1 parent 4687347 commit e03e9f2

11 files changed

Lines changed: 242 additions & 5 deletions

.devops/cann.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# Define the CANN base image for easier version updates later
66
ARG CHIP_TYPE=910b
77
ARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.5.0-${CHIP_TYPE}-openeuler24.03-py3.11
8+
ARG BUILD_DATE=N/A
9+
ARG APP_VERSION=N/A
10+
ARG APP_REVISION=N/A
811

912
# ==============================================================================
1013
# BUILD STAGE
@@ -67,6 +70,19 @@ RUN mkdir -p /app/full && \
6770
# ==============================================================================
6871
FROM ${CANN_BASE_IMAGE} AS base
6972

73+
ARG BUILD_DATE=N/A
74+
ARG APP_VERSION=N/A
75+
ARG APP_REVISION=N/A
76+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
77+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
78+
LABEL org.opencontainers.image.created=$BUILD_DATE \
79+
org.opencontainers.image.version=$APP_VERSION \
80+
org.opencontainers.image.revision=$APP_REVISION \
81+
org.opencontainers.image.title="llama.cpp" \
82+
org.opencontainers.image.description="LLM inference in C/C++" \
83+
org.opencontainers.image.url=$IMAGE_URL \
84+
org.opencontainers.image.source=$IMAGE_SOURCE
85+
7086
# -- Install runtime dependencies --
7187
RUN yum install -y libgomp curl && \
7288
yum clean all && \

.devops/cpu.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ARG UBUNTU_VERSION=24.04
2+
ARG BUILD_DATE=N/A
3+
ARG APP_VERSION=N/A
4+
ARG APP_REVISION=N/A
25

36
FROM ubuntu:$UBUNTU_VERSION AS build
47

@@ -35,6 +38,19 @@ RUN mkdir -p /app/full \
3538
## Base image
3639
FROM ubuntu:$UBUNTU_VERSION AS base
3740

41+
ARG BUILD_DATE=N/A
42+
ARG APP_VERSION=N/A
43+
ARG APP_REVISION=N/A
44+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
45+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
46+
LABEL org.opencontainers.image.created=$BUILD_DATE \
47+
org.opencontainers.image.version=$APP_VERSION \
48+
org.opencontainers.image.revision=$APP_REVISION \
49+
org.opencontainers.image.title="llama.cpp" \
50+
org.opencontainers.image.description="LLM inference in C/C++" \
51+
org.opencontainers.image.url=$IMAGE_URL \
52+
org.opencontainers.image.source=$IMAGE_SOURCE
53+
3854
RUN apt-get update \
3955
&& apt-get install -y libgomp1 curl \
4056
&& apt autoremove -y \

.devops/cuda.Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VER
66

77
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
88

9+
ARG BUILD_DATE=N/A
10+
ARG APP_VERSION=N/A
11+
ARG APP_REVISION=N/A
12+
913
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
1014

1115
# CUDA architecture to build for (defaults to all supported archs)
@@ -40,6 +44,19 @@ RUN mkdir -p /app/full \
4044
## Base image
4145
FROM ${BASE_CUDA_RUN_CONTAINER} AS base
4246

47+
ARG BUILD_DATE=N/A
48+
ARG APP_VERSION=N/A
49+
ARG APP_REVISION=N/A
50+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
51+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
52+
LABEL org.opencontainers.image.created=$BUILD_DATE \
53+
org.opencontainers.image.version=$APP_VERSION \
54+
org.opencontainers.image.revision=$APP_REVISION \
55+
org.opencontainers.image.title="llama.cpp" \
56+
org.opencontainers.image.description="LLM inference in C/C++" \
57+
org.opencontainers.image.url=$IMAGE_URL \
58+
org.opencontainers.image.source=$IMAGE_SOURCE
59+
4360
RUN apt-get update \
4461
&& apt-get install -y libgomp1 curl \
4562
&& apt autoremove -y \

.devops/intel.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ARG ONEAPI_VERSION=2025.3.3-0-devel-ubuntu24.04
2+
ARG BUILD_DATE=N/A
3+
ARG APP_VERSION=N/A
4+
ARG APP_REVISION=N/A
25

36
## Build Image
47

@@ -40,6 +43,19 @@ RUN mkdir -p /app/full \
4043

4144
FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS base
4245

46+
ARG BUILD_DATE=N/A
47+
ARG APP_VERSION=N/A
48+
ARG APP_REVISION=N/A
49+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
50+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
51+
LABEL org.opencontainers.image.created=$BUILD_DATE \
52+
org.opencontainers.image.version=$APP_VERSION \
53+
org.opencontainers.image.revision=$APP_REVISION \
54+
org.opencontainers.image.title="llama.cpp" \
55+
org.opencontainers.image.description="LLM inference in C/C++" \
56+
org.opencontainers.image.url=$IMAGE_URL \
57+
org.opencontainers.image.source=$IMAGE_SOURCE
58+
4359
ARG IGC_VERSION=v2.20.5
4460
ARG IGC_VERSION_FULL=2_2.20.5+19972
4561
ARG COMPUTE_RUNTIME_VERSION=25.40.35563.10

.devops/llama-cli-cann.Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ARG ASCEND_VERSION=8.5.0-910b-openeuler22.03-py3.10
2+
ARG BUILD_DATE=N/A
3+
ARG APP_VERSION=N/A
4+
ARG APP_REVISION=N/A
25

36
FROM ascendai/cann:$ASCEND_VERSION AS build
47

@@ -28,6 +31,20 @@ RUN echo "Building with static libs" && \
2831

2932
# TODO: use image with NNRT
3033
FROM ascendai/cann:$ASCEND_VERSION AS runtime
34+
35+
ARG BUILD_DATE=N/A
36+
ARG APP_VERSION=N/A
37+
ARG APP_REVISION=N/A
38+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
39+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
40+
LABEL org.opencontainers.image.created=$BUILD_DATE \
41+
org.opencontainers.image.version=$APP_VERSION \
42+
org.opencontainers.image.revision=$APP_REVISION \
43+
org.opencontainers.image.title="llama.cpp" \
44+
org.opencontainers.image.description="LLM inference in C/C++" \
45+
org.opencontainers.image.url=$IMAGE_URL \
46+
org.opencontainers.image.source=$IMAGE_SOURCE
47+
3148
COPY --from=build /app/build/bin/llama-cli /app/build/bin/llama-completion /
3249

3350
ENV LC_ALL=C.utf8

.devops/musa.Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_V
66

77
ARG BASE_MUSA_RUN_CONTAINER=mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
88

9+
ARG BUILD_DATE=N/A
10+
ARG APP_VERSION=N/A
11+
ARG APP_REVISION=N/A
12+
913
FROM ${BASE_MUSA_DEV_CONTAINER} AS build
1014

1115
# MUSA architecture to build for (defaults to all supported archs)
@@ -45,6 +49,19 @@ RUN mkdir -p /app/full \
4549
## Base image
4650
FROM ${BASE_MUSA_RUN_CONTAINER} AS base
4751

52+
ARG BUILD_DATE=N/A
53+
ARG APP_VERSION=N/A
54+
ARG APP_REVISION=N/A
55+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
56+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
57+
LABEL org.opencontainers.image.created=$BUILD_DATE \
58+
org.opencontainers.image.version=$APP_VERSION \
59+
org.opencontainers.image.revision=$APP_REVISION \
60+
org.opencontainers.image.title="llama.cpp" \
61+
org.opencontainers.image.description="LLM inference in C/C++" \
62+
org.opencontainers.image.url=$IMAGE_URL \
63+
org.opencontainers.image.source=$IMAGE_SOURCE
64+
4865
RUN apt-get update \
4966
&& apt-get install -y libgomp1 curl \
5067
&& apt autoremove -y \

.devops/openvino.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ARG LIBZE1_VERSION=1.27.0-1~24.04~ppa2
1818
ARG http_proxy=
1919
ARG https_proxy=
2020

21+
ARG BUILD_DATE=N/A
22+
ARG APP_VERSION=N/A
23+
ARG APP_REVISION=N/A
24+
2125
## Build Image
2226
FROM ubuntu:${UBUNTU_VERSION} AS build
2327

@@ -88,6 +92,18 @@ FROM ubuntu:${UBUNTU_VERSION} AS base
8892
# Pass proxy args to runtime stage
8993
ARG http_proxy
9094
ARG https_proxy
95+
ARG BUILD_DATE=N/A
96+
ARG APP_VERSION=N/A
97+
ARG APP_REVISION=N/A
98+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
99+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
100+
LABEL org.opencontainers.image.created=$BUILD_DATE \
101+
org.opencontainers.image.version=$APP_VERSION \
102+
org.opencontainers.image.revision=$APP_REVISION \
103+
org.opencontainers.image.title="llama.cpp" \
104+
org.opencontainers.image.description="LLM inference in C/C++" \
105+
org.opencontainers.image.url=$IMAGE_URL \
106+
org.opencontainers.image.source=$IMAGE_SOURCE
91107

92108
RUN apt-get update \
93109
&& apt-get install -y libgomp1 libtbb12 curl wget ocl-icd-libopencl1 \

.devops/rocm.Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ ARG AMDGPU_VERSION=7.2.1
77
# Target the ROCm build image
88
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99

10+
ARG BUILD_DATE=N/A
11+
ARG APP_VERSION=N/A
12+
ARG APP_REVISION=N/A
13+
1014
### Build image
1115
FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1216

@@ -57,6 +61,19 @@ RUN mkdir -p /app/full \
5761
## Base image
5862
FROM ${BASE_ROCM_DEV_CONTAINER} AS base
5963

64+
ARG BUILD_DATE=N/A
65+
ARG APP_VERSION=N/A
66+
ARG APP_REVISION=N/A
67+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
68+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
69+
LABEL org.opencontainers.image.created=$BUILD_DATE \
70+
org.opencontainers.image.version=$APP_VERSION \
71+
org.opencontainers.image.revision=$APP_REVISION \
72+
org.opencontainers.image.title="llama.cpp" \
73+
org.opencontainers.image.description="LLM inference in C/C++" \
74+
org.opencontainers.image.url=$IMAGE_URL \
75+
org.opencontainers.image.source=$IMAGE_SOURCE
76+
6077
RUN apt-get update \
6178
&& apt-get install -y libgomp1 curl \
6279
&& apt autoremove -y \

.devops/s390x.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
ARG GCC_VERSION=15.2.0
22
ARG UBUNTU_VERSION=24.04
3+
ARG BUILD_DATE=N/A
4+
ARG APP_VERSION=N/A
5+
ARG APP_REVISION=N/A
36

47
### Build Llama.cpp stage
58
FROM gcc:${GCC_VERSION} AS build
@@ -52,6 +55,19 @@ COPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
5255
### Base image
5356
FROM ubuntu:${UBUNTU_VERSION} AS base
5457

58+
ARG BUILD_DATE=N/A
59+
ARG APP_VERSION=N/A
60+
ARG APP_REVISION=N/A
61+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
62+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
63+
LABEL org.opencontainers.image.created=$BUILD_DATE \
64+
org.opencontainers.image.version=$APP_VERSION \
65+
org.opencontainers.image.revision=$APP_REVISION \
66+
org.opencontainers.image.title="llama.cpp" \
67+
org.opencontainers.image.description="LLM inference in C/C++" \
68+
org.opencontainers.image.url=$IMAGE_URL \
69+
org.opencontainers.image.source=$IMAGE_SOURCE
70+
5571
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5672
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
5773
apt update -y && \

.devops/vulkan.Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ARG UBUNTU_VERSION=26.04
2+
ARG BUILD_DATE=N/A
3+
ARG APP_VERSION=N/A
4+
ARG APP_REVISION=N/A
25

36
FROM ubuntu:$UBUNTU_VERSION AS build
47

@@ -31,6 +34,19 @@ RUN mkdir -p /app/full \
3134
## Base image
3235
FROM ubuntu:$UBUNTU_VERSION AS base
3336

37+
ARG BUILD_DATE=N/A
38+
ARG APP_VERSION=N/A
39+
ARG APP_REVISION=N/A
40+
ARG IMAGE_URL=https://github.com/ggml-org/llama.cpp
41+
ARG IMAGE_SOURCE=https://github.com/ggml-org/llama.cpp
42+
LABEL org.opencontainers.image.created=$BUILD_DATE \
43+
org.opencontainers.image.version=$APP_VERSION \
44+
org.opencontainers.image.revision=$APP_REVISION \
45+
org.opencontainers.image.title="llama.cpp" \
46+
org.opencontainers.image.description="LLM inference in C/C++" \
47+
org.opencontainers.image.url=$IMAGE_URL \
48+
org.opencontainers.image.source=$IMAGE_SOURCE
49+
3450
RUN apt-get update \
3551
&& apt-get install -y libgomp1 curl libvulkan1 mesa-vulkan-drivers \
3652
libglvnd0 libgl1 libglx0 libegl1 libgles2 \

0 commit comments

Comments
 (0)