mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-11-03 02:06:20 +08:00
Getting the Triton backend to build and run in a vendor image took a dozen non-obvious steps: a venv because setup.py insists on CONDA_PREFIX, CUDA headers borrowed from the nvidia-cu13 wheels because the image ships only the runtime, NCCL 2.32.3 because DeepEP uses ncclCommQueryProperties, libdw/libelf for DeepGEMM's bundled deep_jit, pciutils for DeepSelect, and a tvm_ffi new enough for tilelang 0.1.15. All of it lived in this session and in prose, which means the next person starts over. `setup_flagtree_image.sh` records it in three stages -- env, build, verify -- and is idempotent, so a failure resumes. It also explains why each workaround exists, since several look arbitrary otherwise: FlagTree is a Triton fork and needs nothing special, but the C++ extensions around it do. `copy_site_packages.py` copies distributions by their declared file lists rather than by name, because pillow installs PIL and pillow.libs, pyzmq installs zmq. It defaults to keeping the image's pillow: a copied one points at vendored libtiff builds the image does not have, and PIL.Image then fails to import. Verified by building into an empty venv rather than the one already set up here: env, build and verify all pass from scratch, and an end-to-end run from that venv produces the same eight-rank-agreeing output as before. |
||
|---|---|---|
| .. | ||
| ab_cases.py | ||
| build_vendor.sh | ||
| build.sh | ||
| compare_layers.py | ||
| copy_site_packages.py | ||
| flagtree_triton_probe.py | ||
| format_csrc.sh | ||
| gen_stub.sh | ||
| h20_ask.py | ||
| h20_attn_check.py | ||
| h20_e2e_report.sh | ||
| h20_engram_check.py | ||
| h20_expert_weight_check.py | ||
| h20_index_decode_check.py | ||
| h20_kv_roundtrip.py | ||
| h20_ops_ab.py | ||
| h20_philox_check.py | ||
| h20_quant_check.py | ||
| h20_real_requant_check.py | ||
| h20_recipe_probe.py | ||
| h20_rng_dump.py | ||
| h20_smoke_check.py | ||
| h20_state_check.py | ||
| h20_topk_check.py | ||
| ref_layer_dump.py | ||
| ref_next_token.py | ||
| setup_flagtree_image.sh | ||