Spaces:
Sleeping
Sleeping
| # Use Python 3.10+ to avoid NumPy version conflicts | |
| FROM python:3.10-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Upgrade pip first to avoid dependency issues | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # Copy only the requirements file first for caching efficiency | |
| COPY requirements.txt . | |
| # Install dependencies (ensure `pickle` is removed from requirements.txt) | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application files | |
| COPY . . | |
| # Expose the port your app runs on | |
| EXPOSE 7860 | |
| # Command to run the application using Gunicorn | |
| CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"] | |