File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,25 @@ ARG UBUNTU_VERSION=22.04
22
33FROM ubuntu:$UBUNTU_VERSION AS build
44
5+ ARG TARGETARCH
6+
7+ ARG GGML_CPU_ARM_ARCH=armv8-a
8+
59RUN apt-get update && \
610 apt-get install -y build-essential git cmake libcurl4-openssl-dev
711
812WORKDIR /app
913
1014COPY . .
1115
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 && \
16+ RUN if [ "$TARGETARCH" = "amd64" ]; then \
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}; \
20+ else \
21+ echo "Unsupported architecture" ; \
22+ exit 1; \
23+ fi && \
1324 cmake --build build -j $(nproc)
1425
1526RUN mkdir -p /app/lib && \
@@ -78,4 +89,4 @@ WORKDIR /app
7889
7990HEALTHCHECK CMD [ "curl" , "-f" , "http://localhost:8080/health" ]
8091
81- ENTRYPOINT [ "/app/llama-server" ]
92+ ENTRYPOINT [ "/app/llama-server" ]
Original file line number Diff line number Diff line change 5454 - name : Set up Docker Buildx
5555 uses : docker/setup-buildx-action@v3
5656
57- - run : sudo apt update && sudo apt install -y qemu-user-static
58-
5957 - name : Log in to Docker Hub
6058 uses : docker/login-action@v2
6159 with :
You can’t perform that action at this time.
0 commit comments