@@ -2,10 +2,10 @@ ARG GCC_VERSION=15.2.0
2
2
ARG UBUNTU_VERSION=24.04
3
3
4
4
# ## Build Llama.cpp stage
5
- FROM --platform=linux/s390x gcc:${GCC_VERSION} AS build
5
+ FROM gcc:${GCC_VERSION} AS build
6
6
7
- RUN --mount=type=cache,target=/var/cache/apt \
8
- --mount=type=cache,target=/var/lib/apt/lists \
7
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
8
+ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
9
9
apt update -y && \
10
10
apt upgrade -y && \
11
11
apt install -y --no-install-recommends \
@@ -40,7 +40,7 @@ COPY requirements /opt/llama.cpp/gguf-py/requirements
40
40
41
41
42
42
# ## Collect all llama.cpp binaries, libraries and distro libraries
43
- FROM --platform=linux/s390x scratch AS collector
43
+ FROM scratch AS collector
44
44
45
45
# Copy llama.cpp binaries and libraries
46
46
COPY --from=build /opt/llama.cpp/bin /llama.cpp/bin
@@ -49,13 +49,14 @@ COPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
49
49
50
50
51
51
# ## Base image
52
- FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION} AS base
52
+ FROM ubuntu:${UBUNTU_VERSION} AS base
53
53
54
- RUN --mount=type=cache,target=/var/cache/apt \
55
- --mount=type=cache,target=/var/lib/apt/lists \
54
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
55
+ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
56
56
apt update -y && \
57
57
apt install -y --no-install-recommends \
58
58
# WARNING: Do not use libopenblas-openmp-dev. libopenblas-dev is faster.
59
+ # See: https://github.com/ggml-org/llama.cpp/pull/15915#issuecomment-3317166506
59
60
curl libgomp1 libopenblas-dev && \
60
61
apt autoremove -y && \
61
62
apt clean -y && \
@@ -68,13 +69,13 @@ COPY --from=collector /llama.cpp/lib /usr/lib/s390x-linux-gnu
68
69
69
70
70
71
# ## Full
71
- FROM --platform=linux/s390x base AS full
72
+ FROM base AS full
72
73
73
74
ENV PATH="/root/.cargo/bin:${PATH}"
74
75
WORKDIR /app
75
76
76
- RUN --mount=type=cache,target=/var/cache/apt \
77
- --mount=type=cache,target=/var/lib/apt/lists \
77
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
78
+ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
78
79
apt update -y && \
79
80
apt install -y \
80
81
git cmake libjpeg-dev \
@@ -97,7 +98,7 @@ ENTRYPOINT [ "/app/tools.sh" ]
97
98
98
99
99
100
# ## CLI Only
100
- FROM --platform=linux/s390x base AS light
101
+ FROM base AS light
101
102
102
103
WORKDIR /llama.cpp/bin
103
104
@@ -108,7 +109,7 @@ ENTRYPOINT [ "/llama.cpp/bin/llama-cli" ]
108
109
109
110
110
111
# ## Server
111
- FROM --platform=linux/s390x base AS server
112
+ FROM base AS server
112
113
113
114
ENV LLAMA_ARG_HOST=0.0.0.0
114
115
0 commit comments