BizIntel_AI / Dockerfile
mgbam's picture
Update Dockerfile
b80050e verified
raw
history blame
1.69 kB
# ─────────────────────────────────────────────────────────────
# BizIntel AI Ultra – HuggingΒ Face Space (Docker + Streamlit)
# ─────────────────────────────────────────────────────────────
FROM python:3.10-slim
# ── Basic Python settings ───────────────────────────────────
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# ── Create app directory & make it the working dir ──────────
WORKDIR /app
ENV HOME=/app # ensure Streamlit writes into /app
# ── Install Python dependencies ─────────────────────────────
COPY requirements.txt /app/
RUN pip install --upgrade pip && pip install -r requirements.txt
# ── Copy the rest of the source code ────────────────────────
COPY . /app
# ── Fix Streamlit & Matplotlib permission issues ────────────
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
ENV MPLCONFIGDIR=/app/.config/matplotlib
# Disable Streamlit usage‑stats (avoids writes to $HOME/.streamlit)
ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
RUN mkdir -p /app/.streamlit /app/.config/matplotlib
# ── Expose the HF‑required port & launch Streamlit ──────────
EXPOSE 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]