# ---- Base Image ---- FROM python:3.10-slim # ---- Environment Settings ---- ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV STREAMLIT_SERVER_PORT=7860 ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 # ---- System Dependencies ---- RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* # ---- Working Directory ---- WORKDIR /app # ---- Copy Requirements ---- COPY requirements.txt . # ---- Install Python Dependencies ---- RUN pip install --no-cache-dir --upgrade pip \ && pip install --no-cache-dir -r requirements.txt # ---- Copy Source Code ---- COPY src ./src # ---- Expose Port (HF uses 7860) ---- EXPOSE 7860 # ---- Run Streamlit App ---- CMD ["streamlit", "run", "src/streamlit_app.py"]