llama-server.Dockerfile 618 B

1234567891011121314151617181920212223242526272829
  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
  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 curl
  12. COPY --from=build /app/llama-server /llama-server
  13. ENV LC_ALL=C.utf8
  14. # Must be set to 0.0.0.0 so it can listen to requests from host machine
  15. ENV LLAMA_ARG_HOST=0.0.0.0
  16. HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
  17. ENTRYPOINT [ "/llama-server" ]