mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-28 08:31:25 +00:00
devops: fix s390x docker release failure (#16231)
This commit is contained in:
@@ -2,10 +2,10 @@ ARG GCC_VERSION=15.2.0
|
|||||||
ARG UBUNTU_VERSION=24.04
|
ARG UBUNTU_VERSION=24.04
|
||||||
|
|
||||||
### Build Llama.cpp stage
|
### Build Llama.cpp stage
|
||||||
FROM --platform=linux/s390x gcc:${GCC_VERSION} AS build
|
FROM gcc:${GCC_VERSION} AS build
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
--mount=type=cache,target=/var/lib/apt/lists \
|
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
||||||
apt update -y && \
|
apt update -y && \
|
||||||
apt upgrade -y && \
|
apt upgrade -y && \
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
@@ -40,7 +40,7 @@ COPY requirements /opt/llama.cpp/gguf-py/requirements
|
|||||||
|
|
||||||
|
|
||||||
### Collect all llama.cpp binaries, libraries and distro libraries
|
### Collect all llama.cpp binaries, libraries and distro libraries
|
||||||
FROM --platform=linux/s390x scratch AS collector
|
FROM scratch AS collector
|
||||||
|
|
||||||
# Copy llama.cpp binaries and libraries
|
# Copy llama.cpp binaries and libraries
|
||||||
COPY --from=build /opt/llama.cpp/bin /llama.cpp/bin
|
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
|
|||||||
|
|
||||||
|
|
||||||
### Base image
|
### Base image
|
||||||
FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION} AS base
|
FROM ubuntu:${UBUNTU_VERSION} AS base
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
--mount=type=cache,target=/var/lib/apt/lists \
|
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
||||||
apt update -y && \
|
apt update -y && \
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
# WARNING: Do not use libopenblas-openmp-dev. libopenblas-dev is faster.
|
# WARNING: Do not use libopenblas-openmp-dev. libopenblas-dev is faster.
|
||||||
|
# See: https://github.com/ggml-org/llama.cpp/pull/15915#issuecomment-3317166506
|
||||||
curl libgomp1 libopenblas-dev && \
|
curl libgomp1 libopenblas-dev && \
|
||||||
apt autoremove -y && \
|
apt autoremove -y && \
|
||||||
apt clean -y && \
|
apt clean -y && \
|
||||||
@@ -68,13 +69,13 @@ COPY --from=collector /llama.cpp/lib /usr/lib/s390x-linux-gnu
|
|||||||
|
|
||||||
|
|
||||||
### Full
|
### Full
|
||||||
FROM --platform=linux/s390x base AS full
|
FROM base AS full
|
||||||
|
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
--mount=type=cache,target=/var/lib/apt/lists \
|
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
||||||
apt update -y && \
|
apt update -y && \
|
||||||
apt install -y \
|
apt install -y \
|
||||||
git cmake libjpeg-dev \
|
git cmake libjpeg-dev \
|
||||||
@@ -97,7 +98,7 @@ ENTRYPOINT [ "/app/tools.sh" ]
|
|||||||
|
|
||||||
|
|
||||||
### CLI Only
|
### CLI Only
|
||||||
FROM --platform=linux/s390x base AS light
|
FROM base AS light
|
||||||
|
|
||||||
WORKDIR /llama.cpp/bin
|
WORKDIR /llama.cpp/bin
|
||||||
|
|
||||||
@@ -108,7 +109,7 @@ ENTRYPOINT [ "/llama.cpp/bin/llama-cli" ]
|
|||||||
|
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
FROM --platform=linux/s390x base AS server
|
FROM base AS server
|
||||||
|
|
||||||
ENV LLAMA_ARG_HOST=0.0.0.0
|
ENV LLAMA_ARG_HOST=0.0.0.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user