Skip to content

Commit 6e264a9

Browse files
authored
docker : add GGML_CPU_ARM_ARCH arg to select ARM architecture to build for (ggml-org#11419)
1 parent 49b0e3c commit 6e264a9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.devops/cpu.Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ FROM ubuntu:$UBUNTU_VERSION AS build
44

55
ARG TARGETARCH
66

7+
ARG GGML_CPU_ARM_ARCH=armv8-a
8+
79
RUN apt-get update && \
810
apt-get install -y build-essential git cmake libcurl4-openssl-dev
911

@@ -12,9 +14,12 @@ WORKDIR /app
1214
COPY . .
1315

1416
RUN if [ "$TARGETARCH" = "amd64" ]; then \
15-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON; \
17+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_NATIVE=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON; \
18+
elif [ "$TARGETARCH" = "arm64" ]; then \
19+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=${GGML_CPU_ARM_ARCH}; \
1620
else \
17-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON; \
21+
echo "Unsupported architecture"; \
22+
exit 1; \
1823
fi && \
1924
cmake --build build -j $(nproc)
2025

0 commit comments

Comments
 (0)