File size: 681 Bytes
0b3909a a18c234 87f9339 a18c234 e1b6b80 0b3909a e1b6b80 0b3909a e1b6b80 0b3909a e1b6b80 |
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 |
FROM python:3.9-slim
# ✅ Define all writable paths explicitly
ENV PYTHONUNBUFFERED=1 \
PORT=8501 \
HF_HOME=/tmp/huggingface \
XDG_CACHE_HOME=/tmp/.cache \
STREAMLIT_HOME=/tmp/.streamlit \
STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_SERVER_PORT=8501 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
COPY src/ ./src/
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
ENTRYPOINT ["streamlit", "run", "src/app.py"]
|