Commit graph

1024 commits

Author SHA1 Message Date
Your Name
fcc9e36220 feat: 更新推斷模組以使用 search token 進行格式推斷,並新增格式搜尋字詞詞庫 2026-01-26 14:14:38 +08:00
Your Name
6d948b0873 feat: implement automatic format inference service with candidate generation and prediction model
- Add formatCandidateRules.ts to define rules for generating format candidates based on file features.
- Introduce formatPredictionModel.ts to predict the most likely target format based on user behavior and file features.
- Create inferenceService.ts to integrate all inference modules and provide a unified inference API.
- Develop inference.tsx as an API endpoint for frontend calls to predict formats and engines based on file extensions.
- Implement logging for conversion events and dismissals, along with user profile retrieval.
- Ensure warmup management for engine predictions and provide status checks.
2026-01-26 12:47:16 +08:00
Your Name
1173d505f7 fix: 修正 release.yml 檔案中的格式問題 2026-01-25 22:01:57 +08:00
Your Name
174eabe9d8 fix: update MinerU -m parameter from 'pipeline' to 'auto' (MinerU 2.7+) 2026-01-25 21:56:19 +08:00
Your Name
f083a14c78 fix: use --lang-out instead of -l for babeldoc (ambiguous option) 2026-01-25 21:51:18 +08:00
Your Name
25e12e8a07 fix: 移除多餘空行以清理 release.yml 檔案 2026-01-25 21:37:46 +08:00
Your Name
4db68fea55 fix: add disk cleanup to verify-image job for large image pull 2026-01-25 21:36:19 +08:00
Your Name
cd4c1e8b31 docs: add v0.1.17 changelog and update Dockerfile.full version 2026-01-25 20:19:48 +08:00
Your Name
23d886817a chore: bump version to v0.1.17 (CPU-only build) 2026-01-25 20:17:18 +08:00
Your Name
18e97ecef9 feat: 改用 CPU-only MinerU,大幅減少 image 大小(~3-5GB)
- Dockerfile: 將 mineru[all] 改為 mineru,移除 PyTorch CUDA 依賴
- Dockerfile.full: 新增 GPU 加速選項(PyTorch CUDA)供進階用戶啟用
- 預估 image 大小從 10-14GB 降至 3-5GB
- MinerU 仍可正常運行(使用 pipeline backend)
2026-01-25 20:10:03 +08:00
Your Name
367f2b4ca6 fix: 更激進的磁碟清理 + BuildKit GC 設定 2026-01-25 20:02:28 +08:00
Your Name
b8025f3256 fix: 添加構建進度提示訊息(exporting layers = 上傳中) 2026-01-25 19:41:22 +08:00
Your Name
e69b2c5225 fix: 移除 timeout 限制,添加上傳完成訊息 2026-01-25 19:34:56 +08:00
Your Name
6e36d35de8 fix: 添加 job timeout 和優化 buildx 設定避免無限卡住 2026-01-25 19:26:28 +08:00
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