# Genesis AI – Dabur Demand Intelligence Platform # HF Spaces Docker deployment FROM python:3.11-slim # HF Spaces runs as non-root user 1000 RUN useradd -m -u 1000 appuser WORKDIR /app # Install dependencies first (layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY app.py . COPY dabur_baseline_forecast_v2.py . COPY dabur_demand_platform.html . # HF Spaces requires port 7860 EXPOSE 7860 # Switch to non-root user USER appuser # Run with gunicorn – threaded for background jobs, no timeout CMD ["gunicorn", "app:app", \ "--bind", "0.0.0.0:7860", \ "--workers", "1", \ "--threads", "8", \ "--timeout", "0", \ "--worker-class", "gthread", \ "--access-logfile", "-"]