]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
docker : fix CPU ARM build (#11403)
authorDiego Devesa <redacted>
Sat, 25 Jan 2025 14:22:29 +0000 (15:22 +0100)
committerGitHub <redacted>
Sat, 25 Jan 2025 14:22:29 +0000 (15:22 +0100)
* docker : fix CPU ARM build

* add CURL to other builds

.devops/cpu.Dockerfile

index 8d020f16c97f348dc14b5c3fee93a4cd21ae1161..ab0e951bc77cb2f03a2ebfddc8d087e5894a3f5e 100644 (file)
@@ -2,6 +2,8 @@ ARG UBUNTU_VERSION=22.04
 
 FROM ubuntu:$UBUNTU_VERSION AS build
 
+ARG TARGETARCH
+
 RUN apt-get update && \
     apt-get install -y build-essential git cmake libcurl4-openssl-dev
 
@@ -9,7 +11,11 @@ WORKDIR /app
 
 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 -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON; \
+    else \
+        cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON; \
+    fi && \
     cmake --build build -j $(nproc)
 
 RUN mkdir -p /app/lib && \