File size: 670 Bytes
3c19042
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e11eccf
 
84581d2
3c19042
 
 
e11eccf
 
 
3c19042
 
 
 
e11eccf
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
FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    poppler-utils \
    tesseract-ocr \
    libtesseract-dev \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy files
COPY requirements.txt .
COPY app.py .
COPY README.md .

# Create /data and /data/files directories with permissions
RUN mkdir -p /data/files /data/nltk_data && chmod -R 777 /data

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Pre-download NLTK data
RUN python -m nltk.downloader -d /data/nltk_data punkt stopwords

# Expose port
EXPOSE 7860

# Run the Gradio app
CMD ["python", "app.py"]