docker : fix CPU ARM build

This commit is contained in:
slaren 2025-01-25 01:19:50 +01:00
parent c5d9effb49
commit 6473d646d5

View file

@ -2,6 +2,8 @@ ARG UBUNTU_VERSION=22.04
FROM ubuntu:$UBUNTU_VERSION AS build FROM ubuntu:$UBUNTU_VERSION AS build
ARG TARGETARCH
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y build-essential git cmake libcurl4-openssl-dev apt-get install -y build-essential git cmake libcurl4-openssl-dev
@ -9,7 +11,11 @@ WORKDIR /app
COPY . . COPY . .
RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release && \ RUN if [ "$TARGETARCH" = "amd64" ]; then \
cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release; \
else \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release; \
fi && \
cmake --build build -j $(nproc) cmake --build build -j $(nproc)
RUN mkdir -p /app/lib && \ RUN mkdir -p /app/lib && \