Skip to content

Commit 2d482eb

Browse files
authored
Merge branch 'ggml-org:master' into master
2 parents f0feafc + 32120c1 commit 2d482eb

778 files changed

Lines changed: 72559 additions & 26606 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG BUILD_DATE=N/A
33
ARG APP_VERSION=N/A
44
ARG APP_REVISION=N/A
55

6-
FROM ubuntu:$UBUNTU_VERSION AS build
6+
FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
77

88
ARG TARGETARCH
99

@@ -37,7 +37,7 @@ RUN mkdir -p /app/full \
3737
&& cp .devops/tools.sh /app/full/tools.sh
3838

3939
## Base image
40-
FROM ubuntu:$UBUNTU_VERSION AS base
40+
FROM docker.io/ubuntu:$UBUNTU_VERSION AS base
4141

4242
ARG BUILD_DATE=N/A
4343
ARG APP_VERSION=N/A
@@ -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: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
ARG UBUNTU_VERSION=24.04
22
# This needs to generally match the container host's environment.
33
ARG CUDA_VERSION=12.8.1
4+
ARG GCC_VERSION=14
45
# Target the CUDA build image
5-
ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
6+
ARG BASE_CUDA_DEV_CONTAINER=docker.io/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
67

7-
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
8+
ARG BASE_CUDA_RUN_CONTAINER=docker.io/nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
89

910
ARG BUILD_DATE=N/A
1011
ARG APP_VERSION=N/A
1112
ARG APP_REVISION=N/A
1213

1314
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
1415

16+
ARG GCC_VERSION
1517
# CUDA architecture to build for (defaults to all supported archs)
1618
ARG CUDA_DOCKER_ARCH=default
1719

1820
RUN apt-get update && \
19-
apt-get install -y gcc-14 g++-14 build-essential cmake python3 python3-pip git libssl-dev libgomp1
21+
apt-get install -y gcc-${GCC_VERSION} g++-${GCC_VERSION} build-essential cmake python3 python3-pip git libssl-dev libgomp1
2022

21-
ENV CC=gcc-14 CXX=g++-14 CUDAHOSTCXX=g++-14
23+
ENV CC=gcc-${GCC_VERSION} CXX=g++-${GCC_VERSION} CUDAHOSTCXX=g++-${GCC_VERSION}
2224

2325
WORKDIR /app
2426

@@ -59,7 +61,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
5961
org.opencontainers.image.source=$IMAGE_SOURCE
6062

6163
RUN apt-get update \
62-
&& apt-get install -y libgomp1 curl \
64+
&& apt-get install -y libgomp1 curl ffmpeg \
6365
&& apt autoremove -y \
6466
&& apt clean -y \
6567
&& rm -rf /tmp/* /var/tmp/* \

.devops/intel.Dockerfile

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ ARG APP_REVISION=N/A
55

66
## Build Image
77

8-
FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS build
8+
FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS build
99

10-
ARG GGML_SYCL_F16=OFF
10+
ARG GGML_SYCL_F16=ON
1111
ARG LEVEL_ZERO_VERSION=1.28.2
1212
ARG LEVEL_ZERO_UBUNTU_VERSION=u24.04
1313
RUN apt-get update && \
@@ -24,7 +24,8 @@ COPY . .
2424

2525
RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \
2626
echo "GGML_SYCL_F16 is set" \
27-
&& export OPT_SYCL_F16="-DGGML_SYCL_F16=ON"; \
27+
&& export OPT_SYCL_F16="-DGGML_SYCL_F16=ON" \
28+
&& export SYCL_PROGRAM_COMPILE_OPTIONS="-cl-fp32-correctly-rounded-divide-sqrt"; \
2829
fi && \
2930
echo "Building with dynamic libs" && \
3031
cmake -B build -DGGML_NATIVE=OFF -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${OPT_SYCL_F16} && \
@@ -42,7 +43,7 @@ RUN mkdir -p /app/full \
4243
&& cp requirements.txt /app/full \
4344
&& cp .devops/tools.sh /app/full/tools.sh
4445

45-
FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS base
46+
FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS base
4647

4748
ARG BUILD_DATE=N/A
4849
ARG APP_VERSION=N/A
@@ -57,11 +58,21 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \
5758
org.opencontainers.image.url=$IMAGE_URL \
5859
org.opencontainers.image.source=$IMAGE_SOURCE
5960

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

7788
RUN apt-get update \
78-
&& apt-get install -y libgomp1 curl \
89+
&& apt-get install -y libgomp1 curl ffmpeg \
7990
&& apt autoremove -y \
8091
&& apt clean -y \
8192
&& rm -rf /tmp/* /var/tmp/* \

.devops/llama-cli-cann.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG BUILD_DATE=N/A
33
ARG APP_VERSION=N/A
44
ARG APP_REVISION=N/A
55

6-
FROM ascendai/cann:$ASCEND_VERSION AS build
6+
FROM docker.io/ascendai/cann:$ASCEND_VERSION AS build
77

88
WORKDIR /app
99

@@ -30,7 +30,7 @@ RUN echo "Building with static libs" && \
3030
cmake --build build --config Release --target llama-completion
3131

3232
# TODO: use image with NNRT
33-
FROM ascendai/cann:$ASCEND_VERSION AS runtime
33+
FROM docker.io/ascendai/cann:$ASCEND_VERSION AS runtime
3434

3535
ARG BUILD_DATE=N/A
3636
ARG APP_VERSION=N/A

.devops/musa.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ ARG UBUNTU_VERSION=22.04
22
# This needs to generally match the container host's environment.
33
ARG MUSA_VERSION=rc4.3.0
44
# Target the MUSA build image
5-
ARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}-amd64
5+
ARG BASE_MUSA_DEV_CONTAINER=docker.io/mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}-amd64
66

7-
ARG BASE_MUSA_RUN_CONTAINER=mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
7+
ARG BASE_MUSA_RUN_CONTAINER=docker.io/mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
88

99
ARG BUILD_DATE=N/A
1010
ARG APP_VERSION=N/A
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ARG APP_VERSION=N/A
2323
ARG APP_REVISION=N/A
2424

2525
## Build Image
26-
FROM ubuntu:${UBUNTU_VERSION} AS build
26+
FROM docker.io/ubuntu:${UBUNTU_VERSION} AS build
2727

2828
# Pass proxy args to build stage
2929
ARG http_proxy
@@ -88,7 +88,7 @@ RUN mkdir -p /app/full \
8888
&& cp .devops/tools.sh /app/full/tools.sh
8989

9090
## Base Runtime Image
91-
FROM ubuntu:${UBUNTU_VERSION} AS base
91+
FROM docker.io/ubuntu:${UBUNTU_VERSION} AS base
9292

9393
# Pass proxy args to runtime stage
9494
ARG http_proxy
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG ROCM_VERSION=7.2.1
55
ARG AMDGPU_VERSION=7.2.1
66

77
# Target the ROCm build image
8-
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
8+
ARG BASE_ROCM_DEV_CONTAINER=docker.io/rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99

1010
ARG BUILD_DATE=N/A
1111
ARG APP_VERSION=N/A
@@ -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/s390x.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG APP_VERSION=N/A
55
ARG APP_REVISION=N/A
66

77
### Build Llama.cpp stage
8-
FROM gcc:${GCC_VERSION} AS build
8+
FROM docker.io/gcc:${GCC_VERSION} AS build
99

1010
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1111
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
@@ -55,7 +55,7 @@ COPY --from=build /opt/llama.cpp/conversion /llama.cpp/conversion
5555

5656

5757
### Base image
58-
FROM ubuntu:${UBUNTU_VERSION} AS base
58+
FROM docker.io/ubuntu:${UBUNTU_VERSION} AS base
5959

6060
ARG BUILD_DATE=N/A
6161
ARG APP_VERSION=N/A

.devops/vulkan.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG BUILD_DATE=N/A
33
ARG APP_VERSION=N/A
44
ARG APP_REVISION=N/A
55

6-
FROM ubuntu:$UBUNTU_VERSION AS build
6+
FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
77

88
# Install build tools
99
RUN apt update && apt install -y git build-essential cmake wget xz-utils
@@ -33,7 +33,7 @@ RUN mkdir -p /app/full \
3333
&& cp .devops/tools.sh /app/full/tools.sh
3434

3535
## Base image
36-
FROM ubuntu:$UBUNTU_VERSION AS base
36+
FROM docker.io/ubuntu:$UBUNTU_VERSION AS base
3737

3838
ARG BUILD_DATE=N/A
3939
ARG APP_VERSION=N/A
@@ -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 \

0 commit comments

Comments
 (0)