Spaces:
Sleeping
Sleeping
| # Use an official Python base image | |
| FROM python:3.10-slim | |
| # Install Tesseract and dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| tesseract-ocr \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libgl1 \ | |
| poppler-utils \ | |
| && apt-get clean | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install Python packages | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all project files | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV FLASK_APP=app.py | |
| # Start Flask app using gunicorn | |
| CMD ["python", "app.py"] | |