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
This commit is contained in:
Your Name 2026-01-24 21:31:11 +08:00
parent ee7c1da01f
commit 27ffdee6f4
8 changed files with 284 additions and 280 deletions

View file

@ -4,14 +4,33 @@ ConvertX-CN Lite 是專為一般使用者設計的輕量版本,提供快速部
---
## 📦 版本對照表
ConvertX-CN 提供三種 Docker Image 版本:
| 版本 | Image Tag | 大小 | 適用場景 |
| ------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| 一般版 | `latest` | ![Docker Image Size](https://img.shields.io/docker/image-size/convertx/convertx-cn/latest?label=image%20size%20) | 進階使用者、AI/OCR/翻譯 |
| 擴充版 | 自行建構 `Dockerfile.full` | >10 GB | 65 種 OCR 語言 |
| Lite 版 | `latest-lite` | ![Docker Image Size (Lite)](<https://img.shields.io/docker/image-size/convertx/convertx-cn/latest-lite?label=image%20size%20(lite)>) | 一般使用者、基本轉檔 |
---
## 📦 什麼是 Lite 版?
| 特性 | Full 版 | Lite 版 |
| -------------- | ---------------------------- | ------------------------ |
| **Image 大小** | 約 8-12 GB | 約 1.2-1.5 GB |
| **部署時間** | 較長(需下載大型模型) | 快速 |
| **記憶體需求** | 較高AI 模型) | 較低 |
| **適用場景** | 進階使用者、需要 AI/OCR/翻譯 | 一般使用者、基本轉檔需求 |
| 特性 | 一般版 | Lite 版 |
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Image 大小** | ![Docker Image Size](https://img.shields.io/docker/image-size/convertx/convertx-cn/latest?label=image%20size%20) | ![Docker Image Size (Lite)](<https://img.shields.io/docker/image-size/convertx/convertx-cn/latest-lite?label=image%20size%20(lite)>) |
| **部署時間** | 較長(含預下載 AI 模型) | 快速 |
| **記憶體需求** | 較高AI 模型) | 較低 |
| **適用場景** | 進階使用者、需要 AI/OCR/翻譯 | 一般使用者、基本轉檔需求 |
| **開箱即用** | ✅ 所有模型已預下載 | ✅ 無需下載 |
> 💡 **一般版開箱即用說明**
>
> - 所有 AI 模型在 Docker build 階段已預下載
> - Runtime 完全離線運行,不依賴網路下載模型
> - 僅翻譯 APIGoogle/Bing/DeepL需要網路連接
---
@ -44,7 +63,7 @@ ConvertX-CN Lite 是專為一般使用者設計的輕量版本,提供快速部
## ❌ Lite 版未包含的功能
以下功能僅在 Full 版中提供:
以下功能僅在一般版中提供:
| 功能類別 | 功能說明 |
| ------------------- | ------------------------------ |
@ -60,6 +79,8 @@ ConvertX-CN Lite 是專為一般使用者設計的輕量版本,提供快速部
| **長期驗證** | LTV、OCSP、CRL、TSA |
| **完整 TexLive** | 進階 LaTeX 排版 |
> ⚠️ **重要提醒**:一般版的 AI/OCR/翻譯功能已預下載所有模型開箱即用Runtime 不會從網路下載任何模型。
---
## 🚀 快速開始
@ -104,10 +125,16 @@ docker compose up -d
| Tag | 說明 |
| ---------------------------------- | ----------------- |
| `convertx/convertx-cn:latest` | Full 版最新穩定版 |
| `convertx/convertx-cn:latest` | 一般版最新穩定版 |
| `convertx/convertx-cn:latest-lite` | Lite 版最新穩定版 |
| `convertx/convertx-cn:0.1.15` | Full 版指定版本 |
| `convertx/convertx-cn:0.1.15-lite` | Lite 版指定版本 |
| `convertx/convertx-cn:0.1.16` | 一般版指定版本 |
| `convertx/convertx-cn:0.1.16-lite` | Lite 版指定版本 |
> 💡 **版本標記說明**
>
> - **一般版**:無後綴,包含所有 AI/OCR/翻譯功能,開箱即用(約 8-12 GB
> - **擴充版**:使用 `Dockerfile.full` 自行建構,支援 65 種 OCR 語言(>10 GB
> - **Lite 版**:帶 `-lite` 後綴,輕量化設計,適合基本轉檔需求(約 1.2 GB
---
@ -152,53 +179,53 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# && rm -rf /var/lib/apt/lists/*
```
### 方法 2直接使用 Full
### 方法 2直接使用一般
如果需要完整功能,建議直接使用 Full 版:
如果需要完整功能,建議直接使用一般版:
```yaml
services:
convertx:
image: convertx/convertx-cn:latest # Full 版
image: convertx/convertx-cn:latest # 一般版(開箱即用)
```
### ⚠️ 重要提醒
- Lite 版**本身不包含** OCR、AI、翻譯等進階功能
- 自行擴充會增加 Image 大小與維護成本
- 如需完整功能,建議直接使用 Full 版
- 如需完整功能,建議直接使用一般版(所有模型已預下載)
---
## 📊 Lite vs Full 功能對照表
## 📊 Lite vs 一般版功能對照表
| 功能類別 | 功能 | Lite | Full |
| --------- | ---------------------------- | :--: | :--: |
| **UI** | 多語言介面65 語言) | ✅ | |
| **UI** | 深色/淺色主題 | ✅ | |
| **轉檔** | 文件轉檔LibreOffice | ✅ | |
| **轉檔** | 圖片轉檔GraphicsMagick | ✅ | |
| **轉檔** | 圖片轉檔ImageMagick | ❌ | |
| **轉檔** | 影音轉檔FFmpeg | ✅ | |
| **轉檔** | 文件格式Pandoc | ✅ | |
| **轉檔** | 向量圖Inkscape | ❌ | |
| **轉檔** | 高效能圖片VIPS | ❌ | |
| **轉檔** | 電子書Calibre | ❌ | |
| **轉檔** | CAD/3Dassimp | ❌ | |
| **PDF** | PDF/A 轉換 | ✅ | |
| **PDF** | PDF 防修改 | ✅ | |
| **PDF** | PDF 數位簽章 | ✅ | |
| **PDF** | PDF/A 驗證veraPDF | ❌ | |
| **PDF** | 長期驗證LTV | ❌ | |
| **OCR** | 文字辨識Tesseract | ❌ | |
| **OCR** | ocrmypdf | ❌ | |
| **AI** | PDF 翻譯PDFMathTranslate | ❌ | |
| **AI** | PDF 翻譯BabelDOC | ❌ | |
| **AI** | PDF 轉 MarkdownMinerU | ❌ | |
| **字型** | 基本 CJK 字型 | ✅ | |
| **字型** | 完整 Noto 字型集 | ❌ | |
| **LaTeX** | 基本 LaTeX | ❌ | |
| **LaTeX** | 完整 TexLive CJK | ❌ | |
| 功能類別 | 功能 | Lite | 一般版 |
| --------- | ---------------------------- | :--: | :----: |
| **UI** | 多語言介面65 語言) | ✅ | |
| **UI** | 深色/淺色主題 | ✅ | |
| **轉檔** | 文件轉檔LibreOffice | ✅ | |
| **轉檔** | 圖片轉檔GraphicsMagick | ✅ | |
| **轉檔** | 圖片轉檔ImageMagick | ❌ | |
| **轉檔** | 影音轉檔FFmpeg | ✅ | |
| **轉檔** | 文件格式Pandoc | ✅ | |
| **轉檔** | 向量圖Inkscape | ❌ | |
| **轉檔** | 高效能圖片VIPS | ❌ | |
| **轉檔** | 電子書Calibre | ❌ | |
| **轉檔** | CAD/3Dassimp | ❌ | |
| **PDF** | PDF/A 轉換 | ✅ | |
| **PDF** | PDF 防修改 | ✅ | |
| **PDF** | PDF 數位簽章 | ✅ | |
| **PDF** | PDF/A 驗證veraPDF | ❌ | |
| **PDF** | 長期驗證LTV | ❌ | |
| **OCR** | 文字辨識Tesseract | ❌ | |
| **OCR** | ocrmypdf | ❌ | |
| **AI** | PDF 翻譯PDFMathTranslate | ❌ | |
| **AI** | PDF 翻譯BabelDOC | ❌ | |
| **AI** | PDF 轉 MarkdownMinerU | ❌ | |
| **字型** | 基本 CJK 字型 | ✅ | |
| **字型** | 完整 Noto 字型集 | ❌ | |
| **LaTeX** | 基本 LaTeX | ❌ | |
| **LaTeX** | 完整 TexLive CJK | ❌ | |
---
@ -211,7 +238,7 @@ services:
- 🔹 需要快速部署
- 🔹 不需要 OCR、AI、翻譯功能
### 適合使用 Full 版的情境
### 適合使用一般版的情境
- 🔹 需要 OCR 文字辨識
- 🔹 需要 PDF 翻譯功能
@ -219,12 +246,13 @@ services:
- 🔹 需要電子書轉換ePub、MOBI
- 🔹 需要 CAD/3D 檔案處理
- 🔹 需要進階 PDF/A 驗證
- 🔹 需要開箱即用的離線 AI 功能
---
## 📝 版本更新
Lite 版與 Full 版使用相同的版本號規則,但 tag 不同:
Lite 版與一般版使用相同的版本號規則,但 tag 不同:
```bash
# 更新 Lite 版
@ -232,7 +260,7 @@ docker compose pull
docker compose up -d
# 或指定版本
docker pull convertx/convertx-cn:0.2.0-lite
docker pull convertx/convertx-cn:0.1.16-lite
```
---
@ -241,5 +269,5 @@ docker pull convertx/convertx-cn:0.2.0-lite
- [Docker Hub](https://hub.docker.com/r/convertx/convertx-cn)
- [GitHub Repository](https://github.com/pi-docket/ConvertX-CN)
- [Full 版部署指南](Docker.md)
- [一般版部署指南](Docker.md)
- [環境變數說明](../配置設定/環境變數.md)