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

@ -154,20 +154,22 @@ jobs:
# - 使用 registry cache 而非 GHA cache避免 10GB 限制)
# - 啟用 zstd compression 減少傳輸量和儲存空間
# - Multi-arch build 需要更多磁碟空間,已在上方清理
# - 明確指定 file: Dockerfile 避免與 Lite 版混淆
# ========================================
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.tag.outputs.version }}
${{ env.DOCKER_IMAGE }}:latest
platforms: linux/amd64,linux/arm64
# 🔥 使用 registry cache 取代 GHA cache
# 🔥 使用獨立的 cache key 避免與 Lite 版交叉污染
# registry cache 沒有 10GB 限制,更適合大型模型
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache,mode=max,compression=zstd
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-full
cache-to: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-full,mode=max,compression=zstd
# 啟用壓縮減少 image 大小
outputs: type=image,compression=zstd,compression-level=3
# 設定 build 參數