Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and app code from build context | |
| # We copy requirements first to leverage layer caching | |
| COPY . . | |
| # Upgrade pip and install dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose the port (matches app.run host/port) | |
| EXPOSE 7860 | |
| # Start with gunicorn; 'app:app' expects app.py to define 'app = Flask(...)' | |
| CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"] | |