mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-05 09:36:52 +00:00
devops: add s390x dockerfile
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
36
.devops/s390x.Dockerfile
Normal file
36
.devops/s390x.Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# vim: filetype=dockerfile
|
||||||
|
|
||||||
|
ARG GCC_VERSION=15.2.0
|
||||||
|
ARG UBUNTU_VERSION=24.10
|
||||||
|
ARG SUPPORT_ZDNN=OFF
|
||||||
|
|
||||||
|
FROM --platform=linux/s390x gcc:${GCC_VERSION} AS build
|
||||||
|
RUN apt update -y \
|
||||||
|
&& apt upgrade -y \
|
||||||
|
&& apt install -y --no-install-recommends cmake \
|
||||||
|
&& apt install -y --no-install-recommends libopenblas-openmp-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/root/.ccache \
|
||||||
|
cmake -S . -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DGGML_BLAS=ON \
|
||||||
|
-DGGML_BLAS_VENDOR=OpenBLAS \
|
||||||
|
-DGGML_ZDNN=$SUPPORT_ZDNN \
|
||||||
|
&& cmake --build build --config Release -j $(nproc)
|
||||||
|
|
||||||
|
RUN cmake --install build --prefix /opt/llama.cpp
|
||||||
|
|
||||||
|
FROM --platform=linux/s390x scratch AS llama-server
|
||||||
|
|
||||||
|
COPY --from=build /opt/llama.cpp/bin/llama-server /
|
||||||
|
|
||||||
|
WORKDIR /models
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
ENTRYPOINT ["/llama-server"]
|
||||||
Reference in New Issue
Block a user