-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 908 Bytes
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.12-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
VOLUME ["/models", "/data", "/tmp/llama-logs"]
EXPOSE 5000
EXPOSE 42069
EXPOSE 8000-8020
ENV MODELS_DIR=/models
ENV DATA_DIR=/data
ENV LOGS_DIR=/tmp/llama-logs
ENV PORT_RANGE_START=8000
ENV PORT_RANGE_END=8020
ENV INTERNAL_PORT_RANGE_START=9000
ENV INTERNAL_PORT_RANGE_END=9020
ENV LLAMAMAN_MAX_MODELS=1
ENV LLAMAMAN_PROXY_PORT=42069
ENV LLAMAMAN_IDLE_TIMEOUT=0
ENV LLAMA_NETWORK=llamaman-net
ENV LLAMA_CONTAINER_PREFIX=llamaman-
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -f http://localhost:5000/health || exit 1
ENTRYPOINT []
CMD ["gunicorn", "-c", "gunicorn.conf.py", "app:app"]