Skip to content

Commit ad7af32

Browse files
committed
test
1 parent 9cf8a0b commit ad7af32

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.devops/cpu.Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@ ARG UBUNTU_VERSION=22.04
22

33
FROM ubuntu:$UBUNTU_VERSION AS build
44

5+
ARG TARGETARCH
6+
7+
ARG GGML_CPU_ARM_ARCH=armv8-a
8+
59
RUN apt-get update && \
610
apt-get install -y build-essential git cmake libcurl4-openssl-dev
711

812
WORKDIR /app
913

1014
COPY . .
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

1526
RUN mkdir -p /app/lib && \
@@ -78,4 +89,4 @@ WORKDIR /app
7889

7990
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
8091

81-
ENTRYPOINT [ "/app/llama-server" ]
92+
ENTRYPOINT [ "/app/llama-server" ]

.github/workflows/docker.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
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:

0 commit comments

Comments
 (0)