From 3f52776a1cd762729347cf9991f8e3ee3eb9c201 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 23 Jul 2025 21:18:47 +0200 Subject: [PATCH] WIP --- backend/Dockerfile.llama-cpp | 27 ++++++++++----------- backend/cpp/llama-cpp/CMakeLists.txt | 2 ++ backend/cpp/llama-cpp/Makefile | 35 ++++++---------------------- backend/cpp/llama-cpp/run.sh | 32 ++----------------------- 4 files changed, 23 insertions(+), 73 deletions(-) diff --git a/backend/Dockerfile.llama-cpp b/backend/Dockerfile.llama-cpp index 6d679eb0c9cf..9aab76355119 100644 --- a/backend/Dockerfile.llama-cpp +++ b/backend/Dockerfile.llama-cpp @@ -11,6 +11,7 @@ ARG GRPC_MAKEFLAGS="-j4 -Otarget" ARG GRPC_VERSION=v1.65.0 ARG CMAKE_FROM_SOURCE=false ARG CMAKE_VERSION=3.26.4 +ARG PROTOBUF_VERSION=v21.12 ENV MAKEFLAGS=${GRPC_MAKEFLAGS} @@ -49,6 +50,14 @@ RUN git clone --recurse-submodules --jobs 4 -b ${GRPC_VERSION} --depth 1 --shall make install && \ rm -rf /build +RUN git clone --recurse-submodules --branch ${PROTOBUF_VERSION} https://github.com/protocolbuffers/protobuf.git && \ + mkdir -p /build/protobuf/build && \ + cd /build/protobuf/build && \ + cmake -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF .. && \ + make && \ + make install && \ + rm -rf /build + FROM ${BASE_IMAGE} AS builder ARG BACKEND=rerankers ARG BUILD_TYPE @@ -180,21 +189,9 @@ COPY --from=grpc /opt/grpc /usr/local COPY . /LocalAI -## Otherwise just run the normal build -RUN <