Commit graph

1010 commits

Author SHA1 Message Date
Your Name
a62a531668 fix: 修復 release workflow job 依賴 + prettier 格式修正 2026-01-25 16:57:42 +08:00
Your Name
1eaf5e4c2c refactor: 重構釋放工作流程,分開構建 AMD64 和 ARM64 映像以優化磁碟空間使用 2026-01-25 16:22:03 +08:00
Your Name
7f74d18089 chore: 移除授權部分內容,簡化 README 文件 2026-01-25 16:17:15 +08:00
Your Name
394dcbec1a Refactor documentation for improved clarity and consistency
- Updated tables for service ports, environment variables, HTTP status codes, and error codes to enhance readability.
- Streamlined JavaScript examples for file conversion and added comments for better understanding.
- Enhanced troubleshooting section with clearer formatting and additional explanations.
- Improved licensing section with detailed requirements and third-party component licenses.
- Organized the document structure for better navigation and accessibility.
2026-01-25 16:10:07 +08:00
Your Name
caecb2e001 新增錯誤排查與支援文件,提供常見問題解決方案;新增開發與貢獻指南,說明專案結構與開發流程;新增授權說明文件,詳述AGPL-3.0授權條款及第三方元件使用情況。 2026-01-25 16:09:58 +08:00
Your Name
11d751250b fix: 更新磁碟清理步驟以釋放更多空間並優化 Docker 建置 2026-01-25 15:05:07 +08:00
Your Name
d38505f6fa feat: 更新 robots.txt、base.tsx 和 sitemap.xml,增強 SEO 設定與多語言支援 2026-01-25 15:03:57 +08:00
Your Name
906f112999 fix(docker): replace python3 -c with heredoc scripts to fix IndentationError 2026-01-25 13:43:49 +08:00
Your Name
a9b1fc5699 fix: revert to v0.1.16, remove incorrect documentation 2026-01-25 13:23:14 +08:00
Your Name
e862cb6667 docs: add Dockerfile refactoring documentation v0.1.17 2026-01-25 13:17:43 +08:00
Your Name
8867eef33e chore: 更新 Dockerfile 版本至 v0.1.17 2026-01-25 13:16:29 +08:00
Your Name
55b0f519ab refactor(docker): 完整重構 Dockerfile v0.1.16
BREAKING CHANGE: Dockerfile 結構重新設計

## 重構內容

### Multi-Stage Build 結構
- Stage 1 [base]: Bun runtime 基礎
- Stage 2 [install]: Node 依賴安裝
- Stage 3 [prerelease]: 應用程式建構
- Stage 4 [system-tools]: APT 系統工具(拆分為 14 個獨立 RUN)
- Stage 5 [fonts]: 字型安裝
- Stage 6 [python-tools]: Python CLI 工具(拆分為 9 個獨立 RUN)
- Stage 7 [models]: 模型下載
- Stage 8 [release]: 最終 Image

### 新增 Scripts
- install-system-tools.sh: 系統工具安裝
- install-fonts.sh: 字型安裝
- install-python-tools.sh: Python 工具安裝
- download-models.sh: 模型下載
- verify-installation.sh: 完整安裝驗證

### 刪除舊檔案
- Dockerfile.backup
- Dockerfile.offline
- Dockerfile.old

### 路徑更新
- MinerU 模型: /opt/convertx/models/mineru/PDF-Extract-Kit-1.0
- BabelDOC 快取: /root/.cache/babeldoc

### Multi-Arch 支援
- linux/amd64: 功能完整
- linux/arm64: 安全降級(MinerU/resvg 跳過)

Closes #docker-refactor
2026-01-25 13:15:31 +08:00
Your Name
e43649bc96 fix: add python3-dev for pykcs11 and fix indentation 2026-01-25 11:30:53 +08:00
Your Name
d03d084294 fix: 添加 --break-system-packages 修復 uv pip install 2026-01-25 11:16:46 +08:00
Your Name
b0d6aea234 feat: 新增完整的 Dockerfile,優化安裝流程與依賴管理 2026-01-25 11:07:13 +08:00
Your Name
367e0d3056 feat: 完全離線化 Dockerfile v0.1.16
## 主要修復
- MinerU: 改用 system-level 安裝 (uv pip install --system)
- MinerU: 模型下載到固定目錄 /opt/mineru/models
- BabelDOC: 完整 warmup + 離線 cache
- PDFMathTranslate: ONNX 模型使用 COPY 指令
- ImageMagick: 確保已安裝

## 結構優化
- Multi-Stage Build (8 stages)
- 使用 heredoc 語法處理多行 Python
- 分階段安裝避免記憶體尖峰

## Runtime 離線模式
- HF_HOME=/nonexistent
- HF_HUB_OFFLINE=1
- BABELDOC_OFFLINE=1
- PIP_NO_INDEX=1

## 新增驗證腳本
- scripts/verify-offline.sh
2026-01-25 11:07:03 +08:00
Your Name
b23d42a7b1 fix(docker): 修復三個關鍵問題
1. pykcs11 編譯失敗:安裝 build-essential, swig, libpcsclite-dev
2. MinerU 模型 cache 問題:模型移動到 /opt/mineru/models/ 固定目錄
   - 不再依賴 HF cache(可安全刪除)
   - mineru.json 指向固定目錄
3. 修復驗證邏輯縮排錯誤

CACHE_BUST: 5
2026-01-25 10:46:22 +08:00
Your Name
0b1ecb7b40 fix(docker): 拆分 RUN 指令,移除 pipx fallback,修復 MinerU 安裝
- 將統一的大型 RUN 拆分成 8 個獨立的 RUN 指令
- MinerU 使用單獨的 RUN 指令(階段 12E)
- 移除 pipx 安裝方式(因 pipx 安裝到 ~/.local/bin 不在 PATH)
- 只使用 system-level 安裝:uv pip install --system 或 pip3 --break-system-packages
- 增加 CACHE_BUST 到 4

Fixes: MinerU 安裝驗證失敗問題
2026-01-25 10:39:00 +08:00
Your Name
f7430107b7 fix: 修復 MinerU 安裝失敗問題,使用 uv pip install(官方推薦方式)
- 改用 uv pip install 替代 pipx install(MinerU 官方推薦)
- 增加至 4 種安裝方法重試
- 增加詳細診斷資訊輸出
- 更新 CACHE_BUST 強制重建
2026-01-25 10:25:59 +08:00
evil0119
2d6ae474f3
更新 README.md 2026-01-25 10:07:18 +08:00
Your Name
688e30abc3 fix: 增加 MinerU 安裝重試等待時間,改善安裝穩定性 2026-01-25 00:43:15 +08:00
Your Name
910250caee fix: MinerU 安裝增加重試機制和備用方法
- 方法 1: pipx install(標準方式)
- 方法 2: pipx install 重試(等待 5 秒後)
- 方法 3: pip3 install(備用方式)
- amd64 必須成功安裝,否則 build 失敗
2026-01-25 00:41:35 +08:00
Your Name
81b82006f0 fix: 預存 ONNX 模型於儲存庫,避免 build 時下載失敗
- 將 DocLayout-YOLO ONNX 模型 (72MB) 預下載到 models/ 目錄
- 使用 COPY 指令複製模型,無需 runtime 下載
- 更新驗證邏輯,跳過已預置的資源驗證
- 添加 CACHE_BUST 到 GitHub Actions workflows
2026-01-25 00:26:44 +08:00
Your Name
0f5bf46111 fix: 新增 CACHE_BUST 參數以強制重新執行模型下載層,改善下載穩定性 2026-01-25 00:22:46 +08:00
Your Name
4b0f77aa2d fix: 預存字型檔案於儲存庫,避免 build 時下載失敗 2026-01-25 00:02:09 +08:00
Your Name
3a7c049818 fix: 修正字型檔案驗證邏輯,確保檔案存在及大小符合要求 2026-01-24 23:48:37 +08:00
Your Name
f2c5997847 fix: use huggingface_hub for ONNX download and add CACHE_BUST
- Use huggingface_hub.hf_hub_download() instead of curl (supports xet storage)
- Add CACHE_BUST ARG to force fresh downloads after cache delete
- Add font file size validation after download
- Re-enable registry cache (buildcache tag deleted manually)
- ARM64 graceful degradation for MinerU
2026-01-24 23:46:44 +08:00
Your Name
2d28665714 fix: 修復 ONNX 模型下載(使用 huggingface_hub 支援 xet 格式)
- 使用 huggingface_hub.hf_hub_download 替代 curl 下載 ONNX 模型
- 增加字型下載的超時和重試設定
- ARM64 架構優雅跳過 MinerU 模型下載
- 驗證邏輯對 ARM64 更寬容,僅 amd64 強制驗證
- 確保 linux/amd64 開箱即用,無運行時模型下載
2026-01-24 23:25:34 +08:00
Your Name
d3aa8e5fee fix: 修正 Dockerfile 中的輸出格式,統一縮排以提高可讀性 2026-01-24 21:49:29 +08:00
Your Name
cc8df3c91d fix: shell syntax for strict model validation in Dockerfile
- Change 'set -eux' to 'set -eu' (remove -x for cleaner logs)
- Fix if statement syntax for set -e compatibility
- Add proper && chaining inside if blocks
- Add fallback echo values for numeric comparisons
2026-01-24 21:42:46 +08:00
Your Name
27ffdee6f4 fix: Docker image size and add download retry mechanism
## Bug Fixes
- Fix standard image size issue (was ~1.5GB, should be 8-12GB)
- Add strict model validation during build
- Add retry mechanism (--retry 3 --retry-delay 5) to all curl downloads

## Documentation
- Clarify version terminology: Standard (一般版), Extended (擴充版), Lite (Lite版)
- Remove duplicate docs/環境變數總覽.md
- Improve environment variable documentation structure
- Add quick reference tables for environment variables

## Build
- Explicitly specify 'file: Dockerfile' in release.yml
- Use 'buildcache-full' cache key to prevent cross-pollution
2026-01-24 21:31:11 +08:00
Your Name
ee7c1da01f docs: 新增線上示範連結至 README 2026-01-24 17:37:27 +08:00
Your Name
99a9934428 docs: 更新 README,新增 Lite 版 Docker 映像大小顯示及版本特性比較 2026-01-24 17:14:10 +08:00
Your Name
9526d3e5c0 docs: 更新 README 版本說明為三版本(Lite/一般版/Full) 2026-01-24 17:05:53 +08:00
Your Name
ca2246dcb6 chore: release v0.1.15 - Lite 版 Docker Image 與基礎架構優化 2026-01-24 16:58:08 +08:00
Your Name
da2c53fd8a fix: 分開處理 GHCR 和 Docker Hub manifest 推送,避免跨 registry 400 錯誤 2026-01-24 16:50:02 +08:00
Your Name
dd0bb2a8df fix: 完全移除 Lite 版 build-time endesive,改用 runtime 憑證初始化 2026-01-24 16:10:01 +08:00
Your Name
d235ba7505 fix: 修復 Dockerfile.lite ARM64 build 問題
- 將 Python 安裝分成多個 RUN 步驟
- 修正 apt-get purge 在 lists 清除後失敗的問題
- 添加動態版本號修改步驟到 docker-build-lite.yml
- Lite 版 UI 將顯示 X.Y.Z-lite 版本號
2026-01-24 16:01:40 +08:00
Your Name
73f2bfd890 fix: 修復 ARM64 上 endesive 編譯問題
- 添加 python3-dev, gcc, libffi-dev 編譯依賴
- 編譯完成後自動移除以減小體積
2026-01-24 15:51:13 +08:00
Your Name
1b8cae30a0 feat: 新增 Lite 版 v0.1.15-lite
- Dockerfile.lite: 輕量版,僅保留英/簡/繁語言
- 移除 Inkscape/VIPS/ImageMagick 以減小體積 (< 1.5 GB)
- docker-build-lite.yml: 自動觸發 Lite 版發布
- docker-build-remote.yml: 改進交互邏輯,支援 standard/full/lite 版本
- release.yml: 修正只觸發一般版發布
2026-01-24 15:47:04 +08:00
Your Name
506340ecda fix: 更新 site.webmanifest 和 base.tsx,新增多語言支持及應用元數據 2026-01-24 15:03:34 +08:00
Your Name
944fe18b75 Add unit tests for PDF Packager converter functionality
- Implement tests for converter properties, ensuring correct input and output formats.
- Add tests for chip parsing, covering various image, pdf_image, and pdfa chip formats.
- Include tests for the isArchiveOutput and getOutputFileName functions.
- Mock execFile for testing the convert function, verifying command execution and output file creation.
- Ensure all chips are parseable and validate the completeness of chip categories.
2026-01-24 14:39:22 +08:00
Your Name
87bd318303 fix: 重構 E2E 測試 - 使用直接工具調用模擬真實用戶操作 2026-01-24 13:17:31 +08:00
Your Name
0755ff7831 fix: 重構 E2E 測試 - 使用 Xvfb 替代 xvfb-run 解決 docker exec 環境問題 2026-01-24 13:11:54 +08:00
Your Name
cb0ea8b578 fix: add xauth package for xvfb-run support 2026-01-24 12:04:36 +08:00
Your Name
d1b81fcb34 fix: 修復 Tools & Model Verification 超時問題 2026-01-24 11:29:42 +08:00
Your Name
2b584dc909 fix: 修復 E2E 測試 - 添加 xvfb-run server-args 和改進錯誤處理 2026-01-24 11:26:22 +08:00
Your Name
699fca4e78 Update account label translations across multiple languages to "Settings" or equivalent 2026-01-24 10:26:35 +08:00
Your Name
6f8ef5834a fix: 修復 Tools & Model Verification 超時問題 2026-01-24 10:19:08 +08:00
Your Name
8a84caa503 Refactor Docker Compose examples and documentation
- Updated README.md to include new example files for minimal and production configurations with detailed instructions.
- Added compose.production-alt.example.yml for an annotated production setup.
- Introduced new example files: compose.minimal.example.yml, compose.production.example.yml, nginx.example.conf, and traefik.example.yml for better clarity and usability.
- Removed outdated configuration files and consolidated documentation for OCR language support.
- Adjusted Nginx and Traefik configurations to reflect best practices and added necessary comments for user guidance.
- Minor formatting and consistency improvements across documentation files.
2026-01-24 00:36:58 +08:00