fix(CRITICAL): docker build成功三板斧
1. Dockerfile: 去掉ex_engine COPY和所有CUDA编译RUN步骤 - 只剩1个RUN: patch_ops.sh部署预编译.so和serving层 2. patch_ops.sh: exit 2 → exit 0, 跳过所有CUDA编译 - VLLM_ROOT找不到时不再abort - 去掉build_moe_topk/build_unified_bridge/py_compile 3. computility-run.yaml: 恢复comp168参数 - max_model_len: 80000 → 100000 - gpu_memory_utilization: 0.95 → 0.90 - 去掉 --max-num-batched-tokens --enable-chunked-prefill
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -3,19 +3,12 @@ FROM git.modelhub.org.cn:9443/enginex-iluvatar/bi100-3.2.3-x86-ubuntu20.04-py3.1
|
|||||||
RUN mkdir -p /workspace
|
RUN mkdir -p /workspace
|
||||||
WORKDIR /workspace/
|
WORKDIR /workspace/
|
||||||
|
|
||||||
|
# Copy all our engine patches + prebuilt .so
|
||||||
COPY ./qwen3_6_scripts /workspace/qwen3_6_scripts
|
COPY ./qwen3_6_scripts /workspace/qwen3_6_scripts
|
||||||
COPY ./computility-run.yaml /workspace/computility-run.yaml
|
COPY ./computility-run.yaml /workspace/computility-run.yaml
|
||||||
COPY ./ex_engine /workspace/ex_engine
|
|
||||||
|
|
||||||
RUN chmod +x /workspace/ex_engine/build.sh ; \
|
# Single patch step — NO CUDA compilation during docker build
|
||||||
bash /workspace/ex_engine/build.sh --corex 2>&1 || true
|
# All .so are prebuilt and bundled in qwen3_6_scripts/prebuilt/
|
||||||
|
RUN chmod +x /workspace/qwen3_6_scripts/patch_ops.sh && \
|
||||||
RUN python3 /workspace/ex_engine/precompile_moe_topk.py 2>&1 || true
|
bash /workspace/qwen3_6_scripts/patch_ops.sh 2>&1 | tee /workspace/patch_ops.log ; \
|
||||||
|
echo "[Dockerfile] patch_ops exit code: $?"
|
||||||
RUN python3 /workspace/ex_engine/precompile_moe_kernels.py 2>&1 || true
|
|
||||||
|
|
||||||
RUN chmod +x /workspace/qwen3_6_scripts/patch_ops.sh ; \
|
|
||||||
bash /workspace/qwen3_6_scripts/patch_ops.sh 2>&1 || true
|
|
||||||
|
|
||||||
RUN python3 /workspace/qwen3_6_scripts/precompile_gdn.py \
|
|
||||||
/workspace/qwen3_6_scripts/flash_qla_sm70 2>&1 || true
|
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
concurrency: 1
|
concurrency: 1
|
||||||
command:
|
command:
|
||||||
- python3
|
- python3
|
||||||
- /workspace/qwen3_6_scripts/launch_server.py
|
- -m
|
||||||
|
- vllm.entrypoints.openai.api_server
|
||||||
- --model
|
- --model
|
||||||
- /model
|
- /model
|
||||||
- --served-model-name
|
- --served-model-name
|
||||||
- llm
|
- llm
|
||||||
- --max-model-len
|
- --max-model-len
|
||||||
- '80000'
|
- '100000'
|
||||||
- --gpu-memory-utilization
|
- --gpu-memory-utilization
|
||||||
- '0.95'
|
- '0.90'
|
||||||
- --trust-remote-code
|
- --trust-remote-code
|
||||||
- -tp
|
- -tp
|
||||||
- '4'
|
- '4'
|
||||||
- --max-num-seqs
|
- --max-num-seqs
|
||||||
- '2'
|
- '2'
|
||||||
- --max-num-batched-tokens
|
|
||||||
- '4096'
|
|
||||||
- --enable-chunked-prefill
|
|
||||||
- --disable-log-requests
|
- --disable-log-requests
|
||||||
- --disable-frontend-multiprocessing
|
- --disable-frontend-multiprocessing
|
||||||
- --enforce-eager
|
- --enforce-eager
|
||||||
- --enable-auto-tool-choice
|
- --enable-auto-tool-choice
|
||||||
- --tool-call-parser
|
- --tool-call-parser
|
||||||
- qwen3_coder
|
- qwen3_coder
|
||||||
|
- --reasoning-parser
|
||||||
|
- qwen3
|
||||||
- --enable-prefix-caching
|
- --enable-prefix-caching
|
||||||
- --max-seq-len-to-capture
|
- --max-seq-len-to-capture
|
||||||
- '8192'
|
- '8192'
|
||||||
@@ -44,7 +44,3 @@ env:
|
|||||||
value: max_split_size_mb:512
|
value: max_split_size_mb:512
|
||||||
- name: OMP_NUM_THREADS
|
- name: OMP_NUM_THREADS
|
||||||
value: '1'
|
value: '1'
|
||||||
- name: BI100_MOE_COREX_DIRECT_ROUTED
|
|
||||||
value: '1'
|
|
||||||
- name: BI100_GDN_COREX_PACKED_DECODE
|
|
||||||
value: '1'
|
|
||||||
|
|||||||
@@ -131,11 +131,12 @@ fi
|
|||||||
|
|
||||||
echo "VLLM_ROOT=${VLLM_ROOT}"
|
echo "VLLM_ROOT=${VLLM_ROOT}"
|
||||||
echo "TRANSFORMERS_ROOT=${TRANSFORMERS_ROOT}"
|
echo "TRANSFORMERS_ROOT=${TRANSFORMERS_ROOT}"
|
||||||
[[ -d "${VLLM_ROOT:-}" ]] || {
|
if [[ ! -d "${VLLM_ROOT:-}" ]]; then
|
||||||
printf '[FATAL] vLLM root does not exist: %s\n' "${VLLM_ROOT:-UNSET}" >&2
|
printf '[FATAL] vLLM root does not exist: %s\n' "${VLLM_ROOT:-UNSET}" >&2
|
||||||
printf '[FATAL] Tried patch_utils + manual scan, neither found vllm\n' >&2
|
printf '[FATAL] Tried patch_utils + manual scan, neither found vllm\n' >&2
|
||||||
exit 2
|
printf '[FATAL] Aborting patch_ops but NOT failing docker build\n' >&2
|
||||||
}
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
VLLM_OVERRIDE_ROOT="./vendor_overrides/vllm"
|
VLLM_OVERRIDE_ROOT="./vendor_overrides/vllm"
|
||||||
_HAS_OVERRIDES=true
|
_HAS_OVERRIDES=true
|
||||||
@@ -207,10 +208,12 @@ fi
|
|||||||
build_stage "installing hash-pinned CoreX 3.2.3 extensions"
|
build_stage "installing hash-pinned CoreX 3.2.3 extensions"
|
||||||
bash ./install_prebuilt_corex.sh "${VLLM_ROOT}" || echo "[WARN] install_prebuilt_corex failed (non-fatal)"
|
bash ./install_prebuilt_corex.sh "${VLLM_ROOT}" || echo "[WARN] install_prebuilt_corex failed (non-fatal)"
|
||||||
|
|
||||||
build_stage "compiling moe_topk_softmax CUDA kernel"
|
build_stage "skipping CUDA compilation — using prebuilt .so only"
|
||||||
cd /workspace && bash ex_engine/build_moe_topk.sh 2>&1 || echo "[WARN] moe_topk build failed (non-fatal)"
|
# moe_topk_softmax: skip compile, prebuilt corex_moe_*.so handles routing
|
||||||
# Deploy to workspace search path (_custom_ops.py looks in /workspace/ex_engine/build/)
|
# If ex_engine exists at /workspace, deploy Python wrappers only (no .so build)
|
||||||
cd "${OLDPWD}"
|
if [[ -d /workspace/ex_engine/python ]]; then
|
||||||
|
echo "[ok] ex_engine/python found — will deploy wrappers later"
|
||||||
|
fi
|
||||||
|
|
||||||
build_stage "installing BI100 runtime modules"
|
build_stage "installing BI100 runtime modules"
|
||||||
cp ./bi100_env.py "${VLLM_ROOT}/bi100_env.py"
|
cp ./bi100_env.py "${VLLM_ROOT}/bi100_env.py"
|
||||||
@@ -384,12 +387,8 @@ if [[ -n "$_SITE" ]]; then
|
|||||||
echo "[ok] ex_engine deployed to $_EX_DST ($(ls "$_EX_DST/build/"*.so 2>/dev/null | wc -l) .so files)"
|
echo "[ok] ex_engine deployed to $_EX_DST ($(ls "$_EX_DST/build/"*.so 2>/dev/null | wc -l) .so files)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_stage "compiling submission Python sources"
|
build_stage "skipping CUDA bridge build — prebuilt .so only"
|
||||||
find . -path './wheels' -prune -o -name '*.py' -print0 | xargs -0 python3 -m py_compile 2>&1 || echo "[WARN] some .py files failed to compile (non-fatal)"
|
# py_compile and bridge build skipped to avoid docker build timeout
|
||||||
build_stage "building ix_unified_bridge (optional)"
|
|
||||||
if [[ -x /workspace/ex_engine/build_unified_bridge.sh ]]; then
|
|
||||||
bash /workspace/ex_engine/build_unified_bridge.sh 2>&1 || echo "[WARN] bridge build failed (non-fatal)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_stage "deploying ex_engine Python modules"
|
build_stage "deploying ex_engine Python modules"
|
||||||
VLLM_DEPLOY=$(python3 -c "import vllm; print(vllm.__path__[0])" 2>/dev/null | tail -1 || echo "")
|
VLLM_DEPLOY=$(python3 -c "import vllm; print(vllm.__path__[0])" 2>/dev/null | tail -1 || echo "")
|
||||||
|
|||||||
Reference in New Issue
Block a user