mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-04 09:32:00 +00:00
devops: add collector stage
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
@@ -30,19 +30,28 @@ RUN cp *.py /opt/llama.cpp \
|
|||||||
|
|
||||||
RUN ls -laR /opt/llama.cpp
|
RUN ls -laR /opt/llama.cpp
|
||||||
|
|
||||||
|
FROM --platform=linux/s390x scratch AS collector
|
||||||
|
|
||||||
|
# Copy llama.cpp binaries and libraries
|
||||||
|
COPY --from=build /opt/llama.cpp/bin /bin/llama.cpp
|
||||||
|
COPY --from=build /opt/llama.cpp/lib /lib/llama.cpp
|
||||||
|
|
||||||
|
# Copy all shared libraries from distro
|
||||||
|
COPY --from=build /usr/lib/s390x-linux-gnu /lib/distro
|
||||||
|
|
||||||
FROM --platform=linux/s390x gcr.io/distroless/cc-debian12:nonroot AS server
|
FROM --platform=linux/s390x gcr.io/distroless/cc-debian12:nonroot AS server
|
||||||
|
|
||||||
ENV LLAMA_ARG_HOST=0.0.0.0
|
ENV LLAMA_ARG_HOST=0.0.0.0
|
||||||
ENV LLAMA_ARG_PORT=8080
|
ENV LLAMA_ARG_PORT=8080
|
||||||
|
|
||||||
# Copy llama.cpp binaries and libraries
|
# Copy llama.cpp binaries and libraries
|
||||||
COPY --from=build /opt/llama.cpp/bin /
|
COPY --from=collector /bin/llama.cpp/llama-server /
|
||||||
COPY --from=build /opt/llama.cpp/lib /usr/lib/s390x-linux-gnu
|
COPY --from=collector /lib/llama.cpp /usr/lib/s390x-linux-gnu
|
||||||
|
|
||||||
# Copy all shared libraries
|
# Copy all shared libraries
|
||||||
COPY --from=build /usr/lib/s390x-linux-gnu /lib/s390x-linux-gnu
|
COPY --from=build /lib/distro /lib/s390x-linux-gnu
|
||||||
|
|
||||||
WORKDIR /models
|
WORKDIR /models
|
||||||
EXPOSE 8080
|
EXPOSE ${LLAMA_ARG_PORT}
|
||||||
|
|
||||||
ENTRYPOINT [ "/llama-server" ]
|
ENTRYPOINT [ "/llama-server" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user