AI-NAME_MAGIC / Dockerfile
MBG0903's picture
Update Dockerfile
a66f0ef verified
raw
history blame contribute delete
736 Bytes
FROM python:3.11-slim
# System deps (fonts help Pillow render crisp text)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Make a writable home so Streamlit can store machine_id etc.
ENV HOME=/tmp
RUN mkdir -p /tmp/.streamlit && chmod -R 777 /tmp/.streamlit
# Python deps
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# App code
COPY src /app/src
# Streamlit runtime
ENV STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_SERVER_PORT=8501 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
STREAMLIT_BROWSER_GATHERUSAGESTATS=false
EXPOSE 8501
CMD ["streamlit", "run", "src/app.py"]