jim800121chen 0cae1b1130 feat(worker): 啟用 staging 真實轉檔(取代 stub)+ 修 ref_images S3 path
staging worker 原本跑 WORKER_MODE=stub(假轉檔、產佔位 NEF),visionA 因此反映拿到的是 stub。本次讓真實轉檔上線並打通 onnx→bie→nef 完整鏈路。

新增:
- services/workers/Dockerfile.real:真實版 worker image,COPY repo 自帶 ktc/ + toolchain/prebuild(2GB),設 USE_PREBUILD/LD_LIBRARY_PATH/PYTHONPATH/KTC_DISABLE_MP/WORKER_MODE=real;排除 libs/dynasty+libs/compiler 省 3.2G
- .dockerignore:控制 build context(排除被 USE_PREBUILD 取代的舊系統 binaries)
- docker-compose.real.yml:override 三 worker 改用 registry image,保留 base stub build 供一鍵 rollback

修正(e2e 抓到的兩個問題):
- jobService.js: ref_images S3 key 由 jobs/{id}/ref_images/ 改為 jobs/{id}/input/ref_images/,對齊系統主約定(local.js/legacy.js/bie worker consumer.py),修好 bie 量化抓不到 dataset 的 blocker。加 contract guard test 鎖死寫入 prefix == worker 讀取 prefix
- security.md: 同步 ref_images S3 key 路徑描述

驗證(staging e2e):
- platform 530(與模型相符)下 onnx→bie→nef 全綠,產真 NEF 636KB(合法 FlatBuffer、非 STUB),/result 可拉、結果上 MinIO
- 已知約定:呼叫端 platform 必須與模型量化 platform 一致(配錯會在 bie 量化階段失敗)

scheduler 全套件 667 tests pass。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 12:43:24 +08:00

35 lines
712 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Build context 瘦身 — 套用於「以專案根目錄為 build context」的 docker build
# Dockerfile.real / Dockerfile.stub
#
# Dockerfile.real 用精準 COPY不會把以下內容放進 image此檔只是避免把它們
# 上傳給 daemon省 ~4.3GB context 傳輸)。
# 大型版本控制目錄
.git
.gitmodules
# 被 USE_PREBUILD 取代的舊系統路徑 binariesimage 不需要,省 3.2GB
libs/dynasty
libs/compiler
# c_sim_* 模擬器NEF 轉檔不需要)
libs/c_sim_520
libs/c_sim_530
libs/c_sim_630
libs/c_sim_720
# Python / OS caches
**/__pycache__
**/*.pyc
**/*.pyo
.pytest_cache
.tmp
.mypy_cache
# 個人層 / 文件
.autoflow
docs
# macOS metadata
**/.DS_Store