FROM python:3.11-slim WORKDIR /app # System deps (PIL butuh libjpeg, dll) RUN apt-get update && apt-get install -y \ libjpeg62-turbo-dev \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . EXPOSE 7860 # Uvicorn with good defaults untuk Docker Space CMD ["uvicorn", "app:app", \ "--host", "0.0.0.0", \ "--port", "7860", \ "--workers", "4", \ "--limit-concurrency", "500", \ "--timeout-keep-alive", "65"]