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 <