llama-server.Dockerfile
1 ARG UBUNTU_VERSION=22.04 2 3 FROM ubuntu:$UBUNTU_VERSION AS build 4 5 RUN apt-get update && \ 6 apt-get install -y build-essential git libcurl4-openssl-dev 7 8 WORKDIR /app 9 10 COPY . . 11 12 ENV LLAMA_CURL=1 13 14 RUN make -j$(nproc) llama-server 15 16 FROM ubuntu:$UBUNTU_VERSION AS runtime 17 18 RUN apt-get update && \ 19 apt-get install -y libcurl4-openssl-dev libgomp1 curl 20 21 COPY --from=build /app/llama-server /llama-server 22 23 ENV LC_ALL=C.utf8 24 # Must be set to 0.0.0.0 so it can listen to requests from host machine 25 ENV LLAMA_ARG_HOST=0.0.0.0 26 27 HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ] 28 29 ENTRYPOINT [ "/llama-server" ]