Spaces:
Sleeping
Sleeping
| # Use an official Python runtime as the base image | |
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application | |
| COPY . . | |
| # Expose the port | |
| EXPOSE 7860 | |
| # Command to run the application with Gunicorn and Uvicorn workers | |
| CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:7860", "--workers", "4", "app:app"] | |