-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 733 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (17 loc) · 733 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
# Containerizes the chat UI (app/streamlit_app.py).
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libreoffice-writer curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p chat_history
ENV HF_HOME=/app/.cache/huggingface
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
EXPOSE 8501
HEALTHCHECK --interval=30s --timeout=5s --start-period=45s --retries=3 \
CMD curl -f http://127.0.0.1:${PORT:-8501}/_stcore/health || exit 1
CMD ["sh", "-c", "streamlit run app/streamlit_app.py --server.port=${PORT:-8501} --server.address=0.0.0.0 --server.headless=true"]