File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Define the CANN base image for easier version updates later
66ARG CHIP_TYPE=910b
77ARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.5.0-${CHIP_TYPE}-openeuler24.03-py3.11
8+ ARG BUILD_DATE
9+ ARG APP_VERSION
10+ ARG APP_REVISION
811
912# ==============================================================================
1013# BUILD STAGE
@@ -67,6 +70,17 @@ RUN mkdir -p /app/full && \
6770# ==============================================================================
6871FROM ${CANN_BASE_IMAGE} AS base
6972
73+ ARG BUILD_DATE
74+ ARG APP_VERSION
75+ ARG APP_REVISION
76+ LABEL org.opencontainers.image.created=$BUILD_DATE \
77+ org.opencontainers.image.version=$APP_VERSION \
78+ org.opencontainers.image.revision=$APP_REVISION \
79+ org.opencontainers.image.title="llama.cpp" \
80+ org.opencontainers.image.description="LLM inference in C/C++" \
81+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
82+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
83+
7084# -- Install runtime dependencies --
7185RUN yum install -y libgomp curl && \
7286 yum clean all && \
Original file line number Diff line number Diff line change 11ARG UBUNTU_VERSION=24.04
2+ ARG BUILD_DATE
3+ ARG APP_VERSION
4+ ARG APP_REVISION
25
36FROM ubuntu:$UBUNTU_VERSION AS build
47
@@ -35,6 +38,17 @@ RUN mkdir -p /app/full \
3538# # Base image
3639FROM ubuntu:$UBUNTU_VERSION AS base
3740
41+ ARG BUILD_DATE
42+ ARG APP_VERSION
43+ ARG APP_REVISION
44+ LABEL org.opencontainers.image.created=$BUILD_DATE \
45+ org.opencontainers.image.version=$APP_VERSION \
46+ org.opencontainers.image.revision=$APP_REVISION \
47+ org.opencontainers.image.title="llama.cpp" \
48+ org.opencontainers.image.description="LLM inference in C/C++" \
49+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
50+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
51+
3852RUN apt-get update \
3953 && apt-get install -y libgomp1 curl \
4054 && apt autoremove -y \
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VER
66
77ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
88
9+ ARG BUILD_DATE
10+ ARG APP_VERSION
11+ ARG APP_REVISION
12+
913FROM ${BASE_CUDA_DEV_CONTAINER} AS build
1014
1115# CUDA architecture to build for (defaults to all supported archs)
@@ -40,6 +44,17 @@ RUN mkdir -p /app/full \
4044# # Base image
4145FROM ${BASE_CUDA_RUN_CONTAINER} AS base
4246
47+ ARG BUILD_DATE
48+ ARG APP_VERSION
49+ ARG APP_REVISION
50+ LABEL org.opencontainers.image.created=$BUILD_DATE \
51+ org.opencontainers.image.version=$APP_VERSION \
52+ org.opencontainers.image.revision=$APP_REVISION \
53+ org.opencontainers.image.title="llama.cpp" \
54+ org.opencontainers.image.description="LLM inference in C/C++" \
55+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
56+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
57+
4358RUN apt-get update \
4459 && apt-get install -y libgomp1 curl \
4560 && apt autoremove -y \
Original file line number Diff line number Diff line change 11ARG ONEAPI_VERSION=2025.3.2-0-devel-ubuntu24.04
2+ ARG BUILD_DATE
3+ ARG APP_VERSION
4+ ARG APP_REVISION
25
36# # Build Image
47
@@ -33,6 +36,17 @@ RUN mkdir -p /app/full \
3336
3437FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS base
3538
39+ ARG BUILD_DATE
40+ ARG APP_VERSION
41+ ARG APP_REVISION
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="https://github.com/ggml-org/llama.cpp" \
48+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
49+
3650ARG IGC_VERSION=v2.30.1
3751ARG IGC_VERSION_FULL=2_2.30.1+20950
3852ARG COMPUTE_RUNTIME_VERSION=26.09.37435.1
Original file line number Diff line number Diff line change 11ARG ASCEND_VERSION=8.5.0-910b-openeuler22.03-py3.10
2+ ARG BUILD_DATE
3+ ARG APP_VERSION
4+ ARG APP_REVISION
25
36FROM ascendai/cann:$ASCEND_VERSION AS build
47
@@ -28,6 +31,18 @@ RUN echo "Building with static libs" && \
2831
2932# TODO: use image with NNRT
3033FROM ascendai/cann:$ASCEND_VERSION AS runtime
34+
35+ ARG BUILD_DATE
36+ ARG APP_VERSION
37+ ARG APP_REVISION
38+ LABEL org.opencontainers.image.created=$BUILD_DATE \
39+ org.opencontainers.image.version=$APP_VERSION \
40+ org.opencontainers.image.revision=$APP_REVISION \
41+ org.opencontainers.image.title="llama.cpp" \
42+ org.opencontainers.image.description="LLM inference in C/C++" \
43+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
44+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
45+
3146COPY --from=build /app/build/bin/llama-cli /app/build/bin/llama-completion /
3247
3348ENV LC_ALL=C.utf8
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ ARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_V
66
77ARG BASE_MUSA_RUN_CONTAINER=mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
88
9+ ARG BUILD_DATE
10+ ARG APP_VERSION
11+ ARG APP_REVISION
12+
913FROM ${BASE_MUSA_DEV_CONTAINER} AS build
1014
1115# MUSA architecture to build for (defaults to all supported archs)
@@ -45,6 +49,17 @@ RUN mkdir -p /app/full \
4549# # Base image
4650FROM ${BASE_MUSA_RUN_CONTAINER} AS base
4751
52+ ARG BUILD_DATE
53+ ARG APP_VERSION
54+ ARG APP_REVISION
55+ LABEL org.opencontainers.image.created=$BUILD_DATE \
56+ org.opencontainers.image.version=$APP_VERSION \
57+ org.opencontainers.image.revision=$APP_REVISION \
58+ org.opencontainers.image.title="llama.cpp" \
59+ org.opencontainers.image.description="LLM inference in C/C++" \
60+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
61+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
62+
4863RUN apt-get update \
4964 && apt-get install -y libgomp1 curl \
5065 && apt autoremove -y \
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ ARG UBUNTU_VERSION=24.04
66ARG http_proxy=
77ARG https_proxy=
88
9+ ARG BUILD_DATE
10+ ARG APP_VERSION
11+ ARG APP_REVISION
12+
913# # Build Image
1014FROM ubuntu:${UBUNTU_VERSION} AS build
1115
@@ -76,6 +80,16 @@ FROM ubuntu:${UBUNTU_VERSION} AS base
7680# Pass proxy args to runtime stage
7781ARG http_proxy
7882ARG https_proxy
83+ ARG BUILD_DATE
84+ ARG APP_VERSION
85+ ARG APP_REVISION
86+ LABEL org.opencontainers.image.created=$BUILD_DATE \
87+ org.opencontainers.image.version=$APP_VERSION \
88+ org.opencontainers.image.revision=$APP_REVISION \
89+ org.opencontainers.image.title="llama.cpp" \
90+ org.opencontainers.image.description="LLM inference in C/C++" \
91+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
92+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
7993
8094RUN apt-get update \
8195 && apt-get install -y libgomp1 libtbb12 curl \
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ ARG AMDGPU_VERSION=7.2.1
77# Target the ROCm build image
88ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99
10+ ARG BUILD_DATE
11+ ARG APP_VERSION
12+ ARG APP_REVISION
13+
1014# ## Build image
1115FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1216
@@ -57,6 +61,17 @@ RUN mkdir -p /app/full \
5761# # Base image
5862FROM ${BASE_ROCM_DEV_CONTAINER} AS base
5963
64+ ARG BUILD_DATE
65+ ARG APP_VERSION
66+ ARG APP_REVISION
67+ LABEL org.opencontainers.image.created=$BUILD_DATE \
68+ org.opencontainers.image.version=$APP_VERSION \
69+ org.opencontainers.image.revision=$APP_REVISION \
70+ org.opencontainers.image.title="llama.cpp" \
71+ org.opencontainers.image.description="LLM inference in C/C++" \
72+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
73+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
74+
6075RUN apt-get update \
6176 && apt-get install -y libgomp1 curl \
6277 && apt autoremove -y \
Original file line number Diff line number Diff line change 11ARG GCC_VERSION=15.2.0
22ARG UBUNTU_VERSION=24.04
3+ ARG BUILD_DATE
4+ ARG APP_VERSION
5+ ARG APP_REVISION
36
47# ## Build Llama.cpp stage
58FROM gcc:${GCC_VERSION} AS build
@@ -52,6 +55,17 @@ COPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
5255# ## Base image
5356FROM ubuntu:${UBUNTU_VERSION} AS base
5457
58+ ARG BUILD_DATE
59+ ARG APP_VERSION
60+ ARG APP_REVISION
61+ LABEL org.opencontainers.image.created=$BUILD_DATE \
62+ org.opencontainers.image.version=$APP_VERSION \
63+ org.opencontainers.image.revision=$APP_REVISION \
64+ org.opencontainers.image.title="llama.cpp" \
65+ org.opencontainers.image.description="LLM inference in C/C++" \
66+ org.opencontainers.image.url="https://github.com/ggml-org/llama.cpp" \
67+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
68+
5569RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5670 --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
5771 apt update -y && \
Original file line number Diff line number Diff line change 11ARG UBUNTU_VERSION=26.04
2+ ARG BUILD_DATE
3+ ARG APP_VERSION
4+ ARG APP_REVISION
25
36FROM ubuntu:$UBUNTU_VERSION AS build
47
@@ -31,6 +34,17 @@ RUN mkdir -p /app/full \
3134# # Base image
3235FROM ubuntu:$UBUNTU_VERSION AS base
3336
37+ ARG BUILD_DATE
38+ ARG APP_VERSION
39+ ARG APP_REVISION
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="https://github.com/ggml-org/llama.cpp" \
46+ org.opencontainers.image.source="https://github.com/ggml-org/llama.cpp"
47+
3448RUN apt-get update \
3549 && apt-get install -y libgomp1 curl libvulkan1 mesa-vulkan-drivers \
3650 libglvnd0 libgl1 libglx0 libegl1 libgles2 \
You can’t perform that action at this time.
0 commit comments