File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change 11ARG UBUNTU_VERSION=22.04
2- ARG GCC_VERSION=15.2.0
32
4- FROM gcc:$GCC_VERSION AS build
3+ FROM ubuntu:$UBUNTU_VERSION AS build
54
65ARG TARGETARCH
76
87RUN apt-get update && \
9- apt-get install -y git cmake libcurl4-openssl-dev
10-
11- RUN if [ "$TARGETARCH" = "s390x" ]; then \
12- apt-get install -y libopenblas-dev; \
13- fi
8+ apt-get install -y build-essential git cmake libcurl4-openssl-dev
149
1510WORKDIR /app
1611
1712COPY . .
1813
1914RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "arm64" ]; then \
2015 cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON; \
21- elif [ "$TARGETARCH" = "s390x" ]; then \
22- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS; \
2316 else \
2417 echo "Unsupported architecture" ; \
2518 exit 1; \
@@ -40,13 +33,8 @@ RUN mkdir -p /app/full \
4033# # Base image
4134FROM ubuntu:$UBUNTU_VERSION AS base
4235
43- ARG TARGETARCH
44-
4536RUN apt-get update \
46- && apt-get install -y libgomp1 curl \
47- && if [ "$TARGETARCH" = "s390x" ]; then \
48- apt-get install -y libopenblas-dev; \
49- fi \
37+ && apt-get install -y libgomp1 curl\
5038 && apt autoremove -y \
5139 && apt clean -y \
5240 && rm -rf /tmp/* /var/tmp/* \
Original file line number Diff line number Diff line change 11ARG GCC_VERSION=15.2.0
22ARG UBUNTU_VERSION=24.04
33
4-
4+ # ## Build stage
55FROM --platform=linux/s390x gcc:${GCC_VERSION} AS build
66
77RUN --mount=type=cache,target=/var/cache/apt \
@@ -30,16 +30,13 @@ RUN --mount=type=cache,target=/root/.ccache \
3030 cmake --build build --config Release -j $(nproc) && \
3131 cmake --install build --prefix /opt/llama.cpp
3232
33- # TODO: DOUBLE CHECK ALL FILES ARE COPIED INTO COLLECTOR
3433COPY *.py /opt/llama.cpp/bin
3534COPY .devops/tools.sh /opt/llama.cpp/bin
3635
3736COPY gguf-py /opt/llama.cpp/gguf-py
3837COPY requirements.txt /opt/llama.cpp/gguf-py
3938COPY requirements /opt/llama.cpp/gguf-py/requirements
4039
41- RUN ls -laR /opt/llama.cpp
42-
4340
4441# ## Collect all llama.cpp binaries, libraries and distro libraries
4542FROM --platform=linux/s390x scratch AS collector
@@ -103,7 +100,7 @@ FROM --platform=linux/s390x base AS light
103100WORKDIR /llama.cpp/bin
104101
105102# Copy llama.cpp binaries and libraries
106- COPY --from=collector /llama.cpp/bin/llama-cli /llama.cpp/bin
103+ COPY --from=collector /llama.cpp/bin/llama-cli /llama.cpp/bin
107104
108105ENTRYPOINT [ "/llama.cpp/bin/llama-cli" ]
109106
You can’t perform that action at this time.
0 commit comments