2026-07-30 15:33:44 +00:00
|
|
|
FROM git.modelhub.org.cn:9443/enginex-iluvatar/bi100-3.2.3-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3
|
|
|
|
|
|
2026-08-11 07:58:05 +00:00
|
|
|
RUN mkdir -p /workspace
|
feat(CRITICAL): import wudixzy/competition complete corex stack — 12 prebuilt .so + 13 CUDA kernels + 2615-line qwen3_5.py
Source: github.com/wudixzy/competition (1527 files, BI-V100 competition reference)
Imported assets:
- 12 prebuilt CoreX .so extensions (corex-3.2.3-ivcore10):
corex_gdn_{beta_decay,causal_conv,gated_norm,packed_decode,qk_map}.so
corex_moe_{direct_routed,exact_reduce,weight_gather}.so
corex_attn_head_rms_norm.so, corex_paged_kv_gather.so
corex_block_major_kv_transfer.so, corex_fused_paged_prefill.so
- 13 CUDA kernel sources (.cu) for above extensions
- 11 build scripts (build_corex_*.sh)
- install_prebuilt_corex.sh (SHA256-verified .so deployment)
- qwen3_5.py (2615 lines) with FULL corex kernel integration
- 9 vllm vendor override files (block manager, sampler, etc)
- 19 patch scripts (model_runner, xformers, block_major, etc)
- Complete serving layer (serving_chat, protocol, api_server, etc)
- bi100_env.py, bi100_profile.py, gdn_prefix.py, block_major_kv_cache.py
- Dockerfile aligned with reference build chain
- computility-run.yaml with BI100_MOE_COREX_DIRECT_ROUTED=1
Call chain verified:
Dockerfile COPY → patch_ops.sh → install_prebuilt_corex.sh → 12 .so to $VLLM_ROOT
qwen3_5.py imports: from vllm import corex_gdn_* / corex_moe_* / corex_attn_*
2026-08-11 03:55:38 +00:00
|
|
|
WORKDIR /workspace/
|
2026-08-11 07:58:05 +00:00
|
|
|
|
2026-08-11 09:59:53 +00:00
|
|
|
# Copy all sources
|
2026-07-30 15:33:44 +00:00
|
|
|
COPY ./qwen3_6_scripts /workspace/qwen3_6_scripts
|
2026-08-11 07:58:05 +00:00
|
|
|
COPY ./computility-run.yaml /workspace/computility-run.yaml
|
|
|
|
|
COPY ./ex_engine /workspace/ex_engine
|
|
|
|
|
|
2026-08-11 16:39:10 +00:00
|
|
|
# Step 1: Build EX Engine .so libraries (tolerant)
|
2026-08-11 11:51:20 +00:00
|
|
|
RUN chmod +x /workspace/ex_engine/build.sh && \
|
2026-08-11 16:39:10 +00:00
|
|
|
(bash /workspace/ex_engine/build.sh --corex 2>&1 || true) | tee /workspace/ex_build.log ; \
|
|
|
|
|
echo "[Dockerfile] ex_engine build done"
|
2026-08-11 11:51:20 +00:00
|
|
|
|
2026-08-11 16:39:10 +00:00
|
|
|
# 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"
|
2026-08-11 11:51:20 +00:00
|
|
|
|
2026-08-11 16:39:10 +00:00
|
|
|
# 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"
|
2026-08-11 11:51:20 +00:00
|
|
|
|
2026-08-11 16:39:10 +00:00
|
|
|
# Step 4: Deploy patches (serving + engine fixes) — tolerant
|
2026-08-11 11:51:20 +00:00
|
|
|
RUN chmod +x /workspace/qwen3_6_scripts/patch_ops.sh && \
|
2026-08-11 16:39:10 +00:00
|
|
|
(cd /workspace/qwen3_6_scripts && bash ./patch_ops.sh 2>&1 || true) | tee /workspace/patch_ops.log ; \
|
|
|
|
|
echo "[Dockerfile] patch_ops done"
|
2026-08-11 11:51:20 +00:00
|
|
|
|
2026-08-11 16:39:10 +00:00
|
|
|
# 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)" && \
|
|
|
|
|
[ -z "$VLLM_ROOT" ] && VLLM_ROOT="/usr/local/corex/lib64/python3/dist-packages/vllm" ; \
|
|
|
|
|
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"
|