# Use lightweight Python image FROM python:3.10-slim # Set working directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ gcc \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements first (better caching) COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy all project files COPY . . # Hugging Face Spaces requires port 7860 EXPOSE 7860 # Run Streamlit app on correct port CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]