Spaces:
Sleeping
Sleeping
| # Use Python 3.11 slim base image | |
| FROM python:3.11-slim | |
| # Avoid interactive prompts | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| # Install system packages | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| curl \ | |
| build-essential \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libgl1-mesa-glx \ | |
| poppler-utils \ | |
| tesseract-ocr \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install git-lfs (olmocr uses some models hosted on LFS) | |
| RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ | |
| apt-get install -y git-lfs && git lfs install | |
| # Set workdir | |
| WORKDIR /app | |
| # Copy requirements and install Python packages | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| # Copy rest of the application | |
| COPY . . | |
| # Expose port (Gradio runs on 7860 by default, but HF Spaces handles routing) | |
| EXPOSE 7860 | |
| # Run the Gradio app | |
| CMD ["python", "app.py"] | |