| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install system dependencies (needed for compiling some ML libraries) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| RUN chmod -R 777 /app | |
| # Expose Streamlit port | |
| EXPOSE 7860 | |
| HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1 | |
| ENTRYPOINT ["python", "-m", "streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"] | |