Spaces:
Sleeping
Sleeping
| # Dockerfile | |
| # 1. Use a more recent, but very stable, Python version | |
| FROM python:3.11-slim | |
| # 2. Set the working directory in the container | |
| WORKDIR /app | |
| # 3. Copy the requirements file into the container | |
| COPY requirements.txt . | |
| # 4. Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 5. Copy the rest of the application code into the container | |
| COPY . . | |
| # 6. Expose the port the app runs on | |
| EXPOSE 7860 | |
| # 7. Define the command to run the application using Gunicorn | |
| CMD ["gunicorn", "--workers", "2", "--threads", "2", "--bind", "0.0.0.0:7860", "app:app"] |