Spaces:
Sleeping
Sleeping
| # Use a lightweight Python base image | |
| FROM python:3.11.6-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install dependencies | |
| WORKDIR /app | |
| COPY requirements.txt /app/ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install Gunicorn | |
| RUN pip install gunicorn | |
| # Copy app files | |
| COPY . /app | |
| # Expose the port Flask will run on | |
| EXPOSE 5000 | |
| # Run the app with Gunicorn | |
| CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"] |