File size: 944 Bytes
73c1ffe
04da152
 
73c1ffe
04da152
 
 
 
73c1ffe
04da152
 
73c1ffe
 
04da152
 
 
 
73c1ffe
 
04da152
 
73c1ffe
04da152
 
 
73c1ffe
04da152
 
73c1ffe
04da152
937ceae
04da152
73c1ffe
04da152
 
73c1ffe
 
 
 
04da152
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 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"]