pdf-table-extract-api / Dockerfile
ozsparkhub's picture
Support Chinese OCR
aa4419a verified
Raw History Blame Contribute Delete
630 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-chi-sim \
tesseract-ocr-chi-tra \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python packages
COPY install_ocr_models.py .
RUN python install_ocr_models.py
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py ocr_support.py ./
# Expose port
EXPOSE 7860
# Run FastAPI with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]