Skip to content

Commit 6154906

Browse files
committed
Merge remote-tracking branch 'upstream/HEAD'
* upstream/HEAD: (329 commits) vendor : update LibreSSL to 4.3.2 (ggml-org#24397) Remove padding and multiple D2D copies for MTP (ggml-org#24086) chat: fix LFM2/LFM2.5 ignoring json_schema (ggml-org#24377) CUDA: Fix ssm_scan_f32 data-races (ggml-org#24360) ci : bump komac version (ggml-org#24396) speculative : fix "ngram-map-k4v" name in logging (ggml-org#24253) webui: implement pinned conversations support (ggml-org#21387) graph: Fix granite speech model inference by applying embedding scale when deepstack is not used (ggml-org#24357) ci : fix windows release (ggml-org#24369) ui: add opt-in run_javascript frontend tool (ggml-org#24244) mtmd: build_vit batching (ggml-org#24352) vulkan: reduce iq1 shared memory usage for mul_mm (ggml-org#24287) vulkan: add `v_dot2_f32_f16` support in matrix-matrix multiplication and Flash Attention (ggml-org#24123) ui: Fix excessive style recalculation on hover (ggml-org#24243) mtmd: refactor video subproc handling (ggml-org#24316) server: log prompts to directory (ggml-org#22031) ui: fix mobile chat form overflow and bust stale bundle cache (ggml-org#24158) ggml : add GGML_OP_COL2IM_1D (ggml-org#24206) server : do not clear slots without unified KV cache (ggml-org#24190) models : fix plamo2 attention_key/value_length regression (ggml-org#24317) ...
2 parents 66cdb0b + ac4cdde commit 6154906

709 files changed

Lines changed: 47137 additions & 17050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devops/cpu.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
5353
org.opencontainers.image.source=$IMAGE_SOURCE
5454

5555
RUN apt-get update \
56-
&& apt-get install -y libgomp1 curl \
56+
&& apt-get install -y libgomp1 curl ffmpeg \
5757
&& apt autoremove -y \
5858
&& apt clean -y \
5959
&& rm -rf /tmp/* /var/tmp/* \

.devops/cuda.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
5959
org.opencontainers.image.source=$IMAGE_SOURCE
6060

6161
RUN apt-get update \
62-
&& apt-get install -y libgomp1 curl \
62+
&& apt-get install -y libgomp1 curl ffmpeg \
6363
&& apt autoremove -y \
6464
&& apt clean -y \
6565
&& rm -rf /tmp/* /var/tmp/* \

.devops/intel.Dockerfile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,21 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
5757
org.opencontainers.image.url=$IMAGE_URL \
5858
org.opencontainers.image.source=$IMAGE_SOURCE
5959

60-
ARG IGC_VERSION=v2.20.5
61-
ARG IGC_VERSION_FULL=2_2.20.5+19972
62-
ARG COMPUTE_RUNTIME_VERSION=25.40.35563.10
63-
ARG COMPUTE_RUNTIME_VERSION_FULL=25.40.35563.10-0
64-
ARG IGDGMM_VERSION=22.8.2
60+
#Following versions are for multiple GPUs, since 26.x has known issue:
61+
# https://github.com/ggml-org/llama.cpp/issues/21747,
62+
# https://github.com/intel/compute-runtime/issues/921.
63+
#ARG IGC_VERSION=v2.20.5
64+
#ARG IGC_VERSION_FULL=2_2.20.5+19972
65+
#ARG COMPUTE_RUNTIME_VERSION=25.40.35563.10
66+
#ARG COMPUTE_RUNTIME_VERSION_FULL=25.40.35563.10-0
67+
#ARG IGDGMM_VERSION=22.8.2
68+
69+
70+
ARG IGC_VERSION=v2.34.4
71+
ARG IGC_VERSION_FULL=2_2.34.4+21428
72+
ARG COMPUTE_RUNTIME_VERSION=26.18.38308.1
73+
ARG COMPUTE_RUNTIME_VERSION_FULL=26.18.38308.1-0
74+
ARG IGDGMM_VERSION=22.10.0
6575
RUN mkdir /tmp/neo/ && cd /tmp/neo/ \
6676
&& wget https://github.com/intel/intel-graphics-compiler/releases/download/$IGC_VERSION/intel-igc-core-${IGC_VERSION_FULL}_amd64.deb \
6777
&& wget https://github.com/intel/intel-graphics-compiler/releases/download/$IGC_VERSION/intel-igc-opencl-${IGC_VERSION_FULL}_amd64.deb \
@@ -75,7 +85,7 @@ RUN mkdir /tmp/neo/ && cd /tmp/neo/ \
7585
&& dpkg --install *.deb
7686

7787
RUN apt-get update \
78-
&& apt-get install -y libgomp1 curl \
88+
&& apt-get install -y libgomp1 curl ffmpeg \
7989
&& apt autoremove -y \
8090
&& apt clean -y \
8191
&& rm -rf /tmp/* /var/tmp/* \

.devops/musa.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
6464
org.opencontainers.image.source=$IMAGE_SOURCE
6565

6666
RUN apt-get update \
67-
&& apt-get install -y libgomp1 curl \
67+
&& apt-get install -y libgomp1 curl ffmpeg \
6868
&& apt autoremove -y \
6969
&& apt clean -y \
7070
&& rm -rf /tmp/* /var/tmp/* \

.devops/nix/package.nix

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
glibc,
44
config,
55
stdenv,
6+
stdenvNoCC,
67
runCommand,
78
cmake,
89
ninja,
@@ -19,6 +20,8 @@
1920
openssl,
2021
shaderc,
2122
spirv-headers,
23+
nodejs,
24+
importNpmLock,
2225
useBlas ?
2326
builtins.all (x: !x) [
2427
useCuda
@@ -130,7 +133,31 @@ effectiveStdenv.mkDerivation (finalAttrs: {
130133
src = lib.cleanSource ../../.;
131134
};
132135

133-
postPatch = ''
136+
# Builds the webui locally, taking care not to require updating any sha256 hash.
137+
webui = stdenvNoCC.mkDerivation {
138+
pname = "webui";
139+
version = llamaVersion;
140+
src = lib.cleanSource ../../tools/ui;
141+
142+
nativeBuildInputs = [
143+
nodejs
144+
importNpmLock.linkNodeModulesHook
145+
];
146+
147+
# no sha256 required when using buildNodeModules
148+
npmDeps = importNpmLock.buildNodeModules {
149+
npmRoot = ../../tools/ui;
150+
inherit nodejs;
151+
};
152+
153+
installPhase = ''
154+
LLAMA_UI_OUT_DIR=$out npm run build --offline
155+
'';
156+
};
157+
158+
postPatch = lib.optionalString useWebUi ''
159+
cp -r ${finalAttrs.webui} tools/ui/dist
160+
chmod -R u+w tools/ui/dist
134161
'';
135162

136163
# With PR#6015 https://github.com/ggml-org/llama.cpp/pull/6015,

.devops/openvino.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
107107
org.opencontainers.image.source=$IMAGE_SOURCE
108108

109109
RUN apt-get update \
110-
&& apt-get install -y libgomp1 libtbb12 curl wget ocl-icd-libopencl1 \
110+
&& apt-get install -y libgomp1 libtbb12 curl wget ffmpeg ocl-icd-libopencl1 \
111111
&& apt autoremove -y \
112112
&& apt clean -y \
113113
&& rm -rf /tmp/* /var/tmp/* \

.devops/rocm.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
7676
org.opencontainers.image.source=$IMAGE_SOURCE
7777

7878
RUN apt-get update \
79-
&& apt-get install -y libgomp1 curl \
79+
&& apt-get install -y libgomp1 curl ffmpeg \
8080
&& apt autoremove -y \
8181
&& apt clean -y \
8282
&& rm -rf /tmp/* /var/tmp/* \

.devops/vulkan.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
4949
org.opencontainers.image.source=$IMAGE_SOURCE
5050

5151
RUN apt-get update \
52-
&& apt-get install -y libgomp1 curl libvulkan1 mesa-vulkan-drivers \
52+
&& apt-get install -y libgomp1 curl ffmpeg libvulkan1 mesa-vulkan-drivers \
5353
libglvnd0 libgl1 libglx0 libegl1 libgles2 \
5454
&& apt autoremove -y \
5555
&& apt clean -y \

.devops/zendnn.Dockerfile

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
ARG UBUNTU_VERSION=24.04
2+
ARG BUILD_DATE=N/A
3+
ARG APP_VERSION=N/A
4+
ARG APP_REVISION=N/A
5+
6+
FROM ubuntu:$UBUNTU_VERSION AS build
7+
8+
RUN apt-get update && \
9+
apt-get install -y gcc-13 g++-13 build-essential git cmake libssl-dev libomp-dev libnuma-dev python3 ca-certificates
10+
11+
ENV CC=gcc-13 CXX=g++-13
12+
13+
WORKDIR /app
14+
15+
COPY . .
16+
17+
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_ZENDNN=ON && \
18+
cmake --build build -j $(nproc)
19+
20+
RUN mkdir -p /app/lib && \
21+
find build -name "*.so*" -exec cp -P {} /app/lib \;
22+
23+
RUN mkdir -p /app/full \
24+
&& cp build/bin/* /app/full \
25+
&& cp *.py /app/full \
26+
&& cp -r conversion /app/full \
27+
&& cp -r gguf-py /app/full \
28+
&& cp -r requirements /app/full \
29+
&& cp requirements.txt /app/full \
30+
&& cp .devops/tools.sh /app/full/tools.sh
31+
32+
## Base image
33+
FROM ubuntu:$UBUNTU_VERSION AS base
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+
48+
RUN apt-get update \
49+
&& apt-get install -y libgomp1 libnuma1 curl ffmpeg \
50+
&& apt autoremove -y \
51+
&& apt clean -y \
52+
&& rm -rf /tmp/* /var/tmp/* \
53+
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
54+
&& find /var/cache -type f -delete
55+
56+
COPY --from=build /app/lib/ /app
57+
58+
### Full
59+
FROM base AS full
60+
61+
COPY --from=build /app/full /app
62+
63+
WORKDIR /app
64+
65+
RUN apt-get update \
66+
&& apt-get install -y \
67+
git \
68+
python3 \
69+
python3-pip \
70+
python3-wheel \
71+
&& pip install --break-system-packages --upgrade setuptools \
72+
&& pip install --break-system-packages -r requirements.txt \
73+
&& apt autoremove -y \
74+
&& apt clean -y \
75+
&& rm -rf /tmp/* /var/tmp/* \
76+
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
77+
&& find /var/cache -type f -delete
78+
79+
ENTRYPOINT ["/app/tools.sh"]
80+
81+
### Light, CLI only
82+
FROM base AS light
83+
84+
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
85+
86+
WORKDIR /app
87+
88+
ENTRYPOINT [ "/app/llama-cli" ]
89+
90+
### Server, Server only
91+
FROM base AS server
92+
93+
ENV LLAMA_ARG_HOST=0.0.0.0
94+
95+
COPY --from=build /app/full/llama-server /app
96+
97+
WORKDIR /app
98+
99+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
100+
101+
ENTRYPOINT [ "/app/llama-server" ]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "ccache-clear"
2+
description: "Delete all GitHub Actions caches matching a key prefix"
3+
inputs:
4+
key:
5+
description: "Cache key prefix to match and delete"
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Clear caches
12+
shell: bash
13+
run: |
14+
CACHES=$(gh cache list --key "ccache-${{ inputs.key }}" --json id,key --jq '.[] | "\(.id) \(.key)"' 2>/dev/null)
15+
if [ -z "$CACHES" ]; then
16+
echo "No caches found with key prefix: ${{ inputs.key }}"
17+
exit 0
18+
fi
19+
while read -r id key; do
20+
echo "Deleting cache: $id ($key)"
21+
gh cache delete "$id"
22+
done <<< "$CACHES"

0 commit comments

Comments
 (0)