2024-01-28 01:55:31 -06:00
|
|
|
ARG UBUNTU_VERSION=22.04
|
|
|
|
|
2024-07-17 20:21:55 +02:00
|
|
|
FROM ubuntu:$UBUNTU_VERSION AS build
|
2024-01-28 01:55:31 -06:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
2024-08-04 14:17:16 -04:00
|
|
|
apt-get install -y build-essential git libcurl4-openssl-dev
|
2024-01-28 01:55:31 -06:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2024-04-03 18:56:37 +01:00
|
|
|
ENV LLAMA_CURL=1
|
|
|
|
|
2024-06-13 00:41:52 +01:00
|
|
|
RUN make -j$(nproc) llama-server
|
2024-01-28 01:55:31 -06:00
|
|
|
|
2024-07-17 20:21:55 +02:00
|
|
|
FROM ubuntu:$UBUNTU_VERSION AS runtime
|
2024-01-28 01:55:31 -06:00
|
|
|
|
2024-04-03 18:56:37 +01:00
|
|
|
RUN apt-get update && \
|
2024-08-04 14:17:16 -04:00
|
|
|
apt-get install -y libcurl4-openssl-dev libgomp1 curl
|
2024-04-03 18:56:37 +01:00
|
|
|
|
2024-06-13 00:41:52 +01:00
|
|
|
COPY --from=build /app/llama-server /llama-server
|
2024-01-28 01:55:31 -06:00
|
|
|
|
|
|
|
ENV LC_ALL=C.utf8
|
2024-08-27 11:07:01 +02:00
|
|
|
# Must be set to 0.0.0.0 so it can listen to requests from host machine
|
|
|
|
ENV LLAMA_ARG_HOST=0.0.0.0
|
2024-01-28 01:55:31 -06:00
|
|
|
|
2024-06-25 08:13:27 -07:00
|
|
|
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
|
|
|
|
|
2024-06-13 00:41:52 +01:00
|
|
|
ENTRYPOINT [ "/llama-server" ]
|