Spaces:
Sleeping
Sleeping
| # Use lightweight Python base | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies for OpenCV | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your Flask app | |
| COPY . . | |
| # Expose port (use Hugging Face default 7860) | |
| EXPOSE 7860 | |
| # Set environment variable for Flask | |
| ENV PORT=7860 | |
| # Run Flask app | |
| CMD ["python", "app2.py"] | |
| # CMD ["waitress-serve", "--port=7860", "app2:app"] |