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-06 06:44:31 +00:00
|
|
|
RUN mkdir -p /workspace
|
2026-07-30 15:33:44 +00:00
|
|
|
WORKDIR /workspace/
|
2026-08-06 06:44:31 +00:00
|
|
|
|
2026-08-10 10:25:31 +00:00
|
|
|
# Copy all sources
|
2026-07-30 15:33:44 +00:00
|
|
|
COPY ./qwen3_6_scripts /workspace/qwen3_6_scripts
|
2026-08-06 06:44:31 +00:00
|
|
|
COPY ./computility-run.yaml /workspace/computility-run.yaml
|
2026-08-10 02:31:55 +00:00
|
|
|
COPY ./ex_engine /workspace/ex_engine
|
|
|
|
|
|
2026-08-11 01:50:42 +00:00
|
|
|
# Step 1: Compile _moe_C (CUB-based topk_softmax + moe_align_block_size)
|
|
|
|
|
# Proven on real BI-V100: WARP_SIZE=64, -cl-fast-relaxed-math, cub/block/block_reduce.cuh
|
|
|
|
|
RUN python3 /workspace/ex_engine/precompile_moe_kernels.py 2>&1 | tee /workspace/ex_build.log ; \
|
|
|
|
|
echo "[Dockerfile] _moe_C precompile exit code: $?"
|
2026-08-10 10:25:31 +00:00
|
|
|
|
2026-08-11 01:50:42 +00:00
|
|
|
# Step 2: Deploy patches (serving + engine fixes)
|
2026-08-10 08:09:22 +00:00
|
|
|
RUN chmod +x /workspace/qwen3_6_scripts/patch_ops.sh && \
|
2026-08-10 08:19:58 +00:00
|
|
|
bash /workspace/qwen3_6_scripts/patch_ops.sh 2>&1 | tee /workspace/patch_ops.log ; \
|
|
|
|
|
echo "[Dockerfile] patch_ops exit code: $?"
|
2026-08-10 10:25:31 +00:00
|
|
|
|
2026-08-11 01:50:42 +00:00
|
|
|
# Step 3: Precompile GDN kernel (needs vllm in path, so after patch_ops)
|
2026-08-10 10:25:31 +00:00
|
|
|
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: $?"
|