llama-server.Dockerfile 519 Bytes
Newer Older
wangkx1's avatar
init  
wangkx1 committed
1
2
ARG UBUNTU_VERSION=22.04

wangkx1's avatar
wangkx1 committed
3
FROM ubuntu:$UBUNTU_VERSION AS build
wangkx1's avatar
init  
wangkx1 committed
4
5
6
7
8
9
10
11
12
13
14
15

RUN apt-get update && \
    apt-get install -y build-essential git libcurl4-openssl-dev

WORKDIR /app

COPY . .

ENV LLAMA_CURL=1

RUN make -j$(nproc) llama-server

wangkx1's avatar
wangkx1 committed
16
FROM ubuntu:$UBUNTU_VERSION AS runtime
wangkx1's avatar
init  
wangkx1 committed
17
18

RUN apt-get update && \
wangkx1's avatar
wangkx1 committed
19
    apt-get install -y libcurl4-openssl-dev libgomp1 curl
wangkx1's avatar
init  
wangkx1 committed
20
21
22
23
24

COPY --from=build /app/llama-server /llama-server

ENV LC_ALL=C.utf8

wangkx1's avatar
wangkx1 committed
25
26
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]

wangkx1's avatar
init  
wangkx1 committed
27
ENTRYPOINT [ "/llama-server" ]