Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 | |
| # Optional: curl untuk debug | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY server.py . | |
| # Railway/Render/Fly/Cloud Run biasanya mengisi $PORT. | |
| # Hugging Face Spaces (Docker) memakai port 7860. | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn server:app --host 0.0.0.0 --port ${PORT:-7860}"] | |