FROM python:3.11-slim WORKDIR /app # Install CPU-only torch (saves ~2GB vs full torch) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . COPY ui.html . COPY landing.html . COPY cyberlog_gpt.pt . EXPOSE 7860 # 1 worker, preload app to share memory, timeout 180s CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--preload", "--timeout", "180", "app:app"]