690530:1329 ADR-030-231-ocr-sandbox-two-step-flow #04.6 [skip ci]
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
# File: specs/04-Infrastructure-OPS/04-00-docker-compose/Desk-5439/ocr-sidecar/Dockerfile
|
||||
# PaddleOCR Sidecar — HTTP API server สำหรับสกัดข้อความจาก PDF/Image
|
||||
# รันบน Desk-5439 (GPU RTX 2060 Super 8GB) ตาม ADR-023A
|
||||
# Tesseract OCR Sidecar — HTTP API server สำหรับสกัดข้อความจาก PDF/Image
|
||||
# รันบน Desk-5439 ตาม ADR-023A
|
||||
# Change Log:
|
||||
# - 2026-05-25: Initial Dockerfile สำหรับ PaddleOCR sidecar (port 8765)
|
||||
# - 2026-05-30: เปลี่ยนจาก PaddleOCR เป็น Tesseract OCR เพื่อความเข้ากันได้กับ CPU เก่า
|
||||
|
||||
FROM python:3.10-slim
|
||||
|
||||
# ติดตั้ง system dependencies สำหรับ PDF processing และ image library
|
||||
# ติดตั้ง system dependencies สำหรับ PDF processing, Tesseract OCR และภาษาไทย
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libglib2.0-0 \
|
||||
libgl1 \
|
||||
libgomp1 \
|
||||
poppler-utils \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-tha \
|
||||
tesseract-ocr-eng \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ติดตั้ง Python dependencies
|
||||
# ใช้ paddlepaddle-gpu สำหรับ GPU acceleration (RTX 2060 Super — CUDA 11.x)
|
||||
# เปลี่ยนเป็น paddlepaddle (CPU only) ถ้าต้องการ fallback
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user