From 7f739415f0d5d413efa7b96347fa602f970013b1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 17:50:33 +0000 Subject: [PATCH] =?UTF-8?q?fix(CRITICAL):=20Dockerfile=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E5=88=B026e6cb40=E5=AE=8C=E5=85=A8=E4=B8=80=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E2=80=94=E2=80=945=E4=B8=AARUN=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前新增的Step 5(bridge build)/Step 6(deploy)/Step 7(gdn)结构 在竞赛平台Docker build失败。真机上全部exit 0但竞赛平台环境不同。 回退到26e6cb40已验证能通过的Dockerfile结构: Step 1: build.sh Step 2: precompile_moe_topk Step 3: precompile_moe_kernels Step 4: patch_ops.sh (已包含bridge build + deploy逻辑) Step 5: precompile_gdn 所有增强功能(bridge build/deploy/ix_unified等)通过patch_ops.sh 在Step 4中完成,不需要额外的Dockerfile RUN step。 --- Dockerfile | 52 +++++++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2038b102..0688abf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,44 +8,26 @@ COPY ./qwen3_6_scripts /workspace/qwen3_6_scripts COPY ./computility-run.yaml /workspace/computility-run.yaml COPY ./ex_engine /workspace/ex_engine -# Step 1: Build EX Engine .so libraries (tolerant) +# Step 1: Build EX Engine .so libraries RUN chmod +x /workspace/ex_engine/build.sh && \ - (bash /workspace/ex_engine/build.sh --corex 2>&1 || true) | tee /workspace/ex_build.log ; \ - echo "[Dockerfile] ex_engine build done" + bash /workspace/ex_engine/build.sh --corex 2>&1 | tee /workspace/ex_build.log ; \ + echo "[Dockerfile] ex_engine build exit code: $?" -# Step 2: Precompile MoE CUDA kernels (tolerant) -RUN (python3 /workspace/ex_engine/precompile_moe_topk.py 2>&1 || true) | tee -a /workspace/ex_build.log ; \ - echo "[Dockerfile] moe_topk precompile done" +# Step 2: Precompile MoE CUDA kernels +RUN python3 /workspace/ex_engine/precompile_moe_topk.py 2>&1 | tee -a /workspace/ex_build.log ; \ + echo "[Dockerfile] moe_topk precompile exit code: $?" -# Step 3: Precompile vllm v0.5.5 MoE kernels (tolerant) -RUN (python3 /workspace/ex_engine/precompile_moe_kernels.py 2>&1 || true) | tee -a /workspace/ex_build.log ; \ - echo "[Dockerfile] moe_v055 precompile done" +# Step 3: Precompile vllm v0.5.5 MoE kernels +RUN python3 /workspace/ex_engine/precompile_moe_kernels.py 2>&1 | tee -a /workspace/ex_build.log ; \ + echo "[Dockerfile] moe_v055 precompile exit code: $?" -# Step 4: Deploy patches (serving + engine fixes) — tolerant +# Step 4: Deploy patches (serving + engine fixes) +# patch_ops.sh also builds bridge, deploys .so and Python modules RUN chmod +x /workspace/qwen3_6_scripts/patch_ops.sh && \ - (cd /workspace/qwen3_6_scripts && bash ./patch_ops.sh 2>&1 || true) | tee /workspace/patch_ops.log ; \ - echo "[Dockerfile] patch_ops done" + bash /workspace/qwen3_6_scripts/patch_ops.sh 2>&1 | tee /workspace/patch_ops.log ; \ + echo "[Dockerfile] patch_ops exit code: $?" -# Step 5: Build ix_unified_bridge.so (tolerant — ixformer symbols resolved at runtime) -RUN if [ -f /workspace/ex_engine/build_unified_bridge.sh ]; then \ - chmod +x /workspace/ex_engine/build_unified_bridge.sh && \ - (bash /workspace/ex_engine/build_unified_bridge.sh 2>&1 || true) | tee -a /workspace/ex_build.log ; \ - fi ; \ - echo "[Dockerfile] bridge build done" - -# Step 6: Deploy ix_unified Python modules to vllm path (tolerant) -RUN VLLM_ROOT="$(python3 -c 'import vllm; print(vllm.__path__[0])' 2>/dev/null | grep -v '^INFO\|^WARNING\|^DEBUG' | tail -1)" ; \ - if [ -z "$VLLM_ROOT" ]; then VLLM_ROOT="/usr/local/corex/lib64/python3/dist-packages/vllm"; fi ; \ - echo "[Dockerfile] VLLM_ROOT=${VLLM_ROOT}" && \ - for f in ix_unified.py corex_so_loader.py moe_fused_dispatch.py corex_moe.py; do \ - [ -f "/workspace/ex_engine/python/$f" ] && cp "/workspace/ex_engine/python/$f" "${VLLM_ROOT}/$f" 2>/dev/null || true ; \ - done ; \ - for _so in /workspace/ex_engine/build/ix_unified_bridge*.so; do \ - [ -f "$_so" ] && cp "$_so" "${VLLM_ROOT}/" 2>/dev/null || true ; \ - done ; \ - echo "[Dockerfile] bridge deploy done" - -# Step 7: Precompile GDN kernel (tolerant) -RUN (python3 /workspace/qwen3_6_scripts/precompile_gdn.py \ - /workspace/qwen3_6_scripts/flash_qla_sm70 2>&1 || true) | tee -a /workspace/ex_build.log ; \ - echo "[Dockerfile] gdn precompile done" +# Step 5: Precompile GDN kernel (needs vllm in path, so after patch_ops) +RUN python3 /workspace/qwen3_6_scripts/precompile_gdn.py \ + /workspace/qwen3_6_scripts/flash_qla_sm70 2>&1 | tee -a /workspace/ex_build.log ; \ + echo "[Dockerfile] gdn precompile exit code: $?"