Spaces:
Sleeping
Sleeping
| # Use a lightweight Python base image | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements file first (for efficient Docker caching) | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application files | |
| COPY . . | |
| # Expose port (Flask default is 5000) | |
| EXPOSE 5000 | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| # Run the Flask app | |
| CMD ["python", "app.py"] | |