fix(build): add .dockerignore + safe probe — fix docker build failure

Build was failing, likely due to:
1. 165MB build context (no .dockerignore) — cccl_upstream/ 53MB, zip 97MB
2. probe_corex_api.py used importlib.import_module which may init CUDA
3. pip install without --timeout could hang on unreachable mirror

Fixes:
- .dockerignore: excludes cccl_upstream/, vllm/, *.zip, docs/ etc
  Build context: ~2MB instead of 165MB
- probe_corex_api.py: rewritten to use ONLY ast.parse, zero runtime imports
- pip install: added --timeout 30
This commit is contained in:
Claude
2026-08-08 11:21:43 +00:00
parent dbfe20fd1c
commit c1065aaf2c
3 changed files with 98 additions and 130 deletions

View File

@@ -57,7 +57,7 @@ for P in /usr/local/lib/python3.10/site-packages/transformers/models \
done
if [ -n "$TMODELS" ]; then
# Base engine requires transformers 4.55.3 for Qwen3_5Config support
pip install transformers==4.55.3 -i https://pypi.tuna.tsinghua.edu.cn/simple 2>&1 || \
pip install transformers==4.55.3 -i https://pypi.tuna.tsinghua.edu.cn/simple --timeout 30 2>&1 || \
echo "[patch_ops] WARNING: transformers install failed (may already be correct version)"
cp -r ./qwen3_5 "$TMODELS/" 2>/dev/null && echo "[patch_ops] qwen3_5 config copied" || true
cp -r ./qwen3_5_moe "$TMODELS/" 2>/dev/null && echo "[patch_ops] qwen3_5_moe config copied" || true