Files
hyungi_document_server/services/ocr/Dockerfile
T
Hyungi Ahn 7883ac67b3 feat(ocr): Surya OCR 마이크로서비스 추가
GPU 가속 OCR (Surya, Apache 2.0) 별도 컨테이너로 추가.
스캔 PDF/이미지 파일의 텍스트 추출 지원.

- services/ocr: Dockerfile + server.py + requirements.txt
- /health (liveness) + /ready (readiness, CUDA+모델 상태)
- /ocr: 페이지 단위 스트리밍 처리 (메모리 피크 억제)
- docker-compose: ocr-service + GPU reservation + ocr_models 볼륨

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 15:03:55 +09:00

17 lines
424 B
Docker

FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime
WORKDIR /app
# PyMuPDF/Pillow 시스템 의존성
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 libglib2.0-0 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY server.py .
EXPOSE 3200
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "3200"]