Spaces:
Paused
Paused
| # Use Python 3.13 slim image as base | |
| FROM python:3.13-slim | |
| # Set working directory to root | |
| WORKDIR / | |
| # Copy requirements first to leverage Docker cache | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install gunicorn | |
| RUN pip install gunicorn | |
| # Copy all application directories and files | |
| COPY main.py . | |
| COPY server/ server/ | |
| COPY utils/ utils/ | |
| COPY static/ static/ | |
| COPY voices/ voices/ | |
| # Set default environment variables | |
| ENV HOST=0.0.0.0 \ | |
| PORT=7860 \ | |
| VERIFY_SSL=true \ | |
| MAX_QUEUE_SIZE=100 | |
| # Expose the app port (same as ENV PORT) | |
| EXPOSE 7860 | |
| # Run the application with Gunicorn | |
| # Format: gunicorn -w <workers> -b <bind-address> <module>:<app-instance> | |
| CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7000", "main:app"] | |