llama-server.Dockerfile 519 B

123456789101112131415161718192021222324252627
  1. ARG UBUNTU_VERSION=22.04
  2. FROM ubuntu:$UBUNTU_VERSION as build
  3. RUN apt-get update && \
  4. apt-get install -y build-essential git libcurl4-openssl-dev curl
  5. WORKDIR /app
  6. COPY . .
  7. ENV LLAMA_CURL=1
  8. RUN make -j$(nproc) llama-server
  9. FROM ubuntu:$UBUNTU_VERSION as runtime
  10. RUN apt-get update && \
  11. apt-get install -y libcurl4-openssl-dev libgomp1
  12. COPY --from=build /app/llama-server /llama-server
  13. ENV LC_ALL=C.utf8
  14. HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
  15. ENTRYPOINT [ "/llama-server" ]