Skip to content

Commit e8e1d73

Browse files
slarenmglambda
authored andcommitted
docker : fix CPU ARM build (ggml-org#11403)
* docker : fix CPU ARM build * add CURL to other builds
1 parent ef8518a commit e8e1d73

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.devops/cpu.Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ ARG UBUNTU_VERSION=22.04
22

33
FROM ubuntu:$UBUNTU_VERSION AS build
44

5+
ARG TARGETARCH
6+
57
RUN apt-get update && \
68
apt-get install -y build-essential git cmake libcurl4-openssl-dev
79

810
WORKDIR /app
911

1012
COPY . .
1113

12-
RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release && \
14+
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; \
16+
else \
17+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON; \
18+
fi && \
1319
cmake --build build -j $(nproc)
1420

1521
RUN mkdir -p /app/lib && \

0 commit comments

Comments
 (0)