# GeoAI Backend — HuggingFace Docker Space # Python 3.11 slim FROM python:3.11-slim # HuggingFace Spaces requires port 7860 ENV PORT=7860 ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app # Install dependencies first (layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all backend source files COPY . . EXPOSE 7860 CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "2", "--timeout", "120"]