Files
OCR/requirements.txt
beabigegg 0f81d5e70b feat: Docker化部署 - 單容器架構轉換
將 Tool_OCR 從 macOS conda 環境轉換為 Docker 單容器部署方案。
前後端整合於同一容器,通過 Nginx 反向代理,僅對外暴露單一端口。

## 新增功能
- Docker 單容器架構(Frontend + Backend + Nginx)
- 多階段構建優化鏡像大小
- Supervisor 進程管理
- 健康檢查機制
- 完整部署文檔

## 技術細節
- 對外端口:12015(原 12010 已被佔用)
- 內部架構:Nginx(12015) → FastAPI(8000)
- 前端靜態文件由 Nginx 直接服務
- API 請求通過 Nginx 反向代理

## 系統依賴完善
- libmagic1:文件類型檢測
- LibreOffice:Office 文檔轉換
- paddlex[ocr]:PP-StructureV3 版面分析
- 中日韓字體支援

## 配置調整
- 環境變數路徑:macOS 路徑 → 容器絕對路徑
- 前端 API URL:修正為統一端口 12015
- Pip 安裝:延長超時至 600 秒,重試 5 次
- CRLF 轉換:自動處理 Windows 換行符

## 清理
- 移除臨時文檔(API_FIX_SUMMARY.md 等 7 個文檔)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 13:12:59 +08:00

65 lines
1.4 KiB
Plaintext

# Tool_OCR - Backend Dependencies
# Python 3.10+
# ===== Core Framework =====
fastapi==0.115.0
uvicorn[standard]==0.32.0
pydantic==2.9.2
pydantic-settings==2.6.1
email-validator>=2.0.0 # For pydantic EmailStr validation
# ===== OCR Engine =====
paddleocr>=3.0.0
paddlepaddle>=3.0.0
paddlex[ocr]>=3.0.0 # Required for PP-StructureV3 layout analysis
# ===== Image Processing =====
pillow>=10.0.0
pdf2image>=1.17.0
opencv-python>=4.8.0
# ===== PDF Generation =====
weasyprint>=60.0
markdown>=3.5.0
# Note: pandoc needs to be installed via brew (brew install pandoc)
# ===== Data Export =====
pandas>=2.1.0
openpyxl>=3.1.0 # Excel support
# ===== Database =====
sqlalchemy>=2.0.0
pymysql>=1.1.0
alembic>=1.13.0
# ===== Authentication =====
python-jose[cryptography]>=3.3.0
passlib[bcrypt]>=1.7.4
bcrypt==4.2.1 # Pin to 4.2.1 for passlib compatibility
python-multipart>=0.0.6
# ===== Configuration =====
python-dotenv>=1.0.0
pyyaml>=6.0
# ===== HTTP Client =====
httpx>=0.25.0
requests>=2.31.0
# ===== Background Tasks (Optional) =====
# redis>=5.0.0 # Uncomment if using Redis for task queue
# celery>=5.3.0 # Uncomment if using Celery
# ===== Translation (Reserved) =====
# argostranslate>=1.9.0 # Uncomment when implementing translation
# ===== Development Tools =====
pytest>=7.4.0
pytest-asyncio>=0.21.0
pytest-cov>=4.1.0
black>=23.9.0
pylint>=3.0.0
# ===== Utilities =====
python-magic>=0.4.27 # File type detection