Selaa lähdekoodia

fix(docker): complete DS4 src runtime lock with flashinfer transitive deps

flashinfer 0.6.15 is built from source and installed with --no-deps, so its
install_requires are never resolved into the runtime lock. gen-locks.sh
strips the flashinfer pin, dropping the hard transitive deps and leaving
pip check failing on cuda-tile and nccl4py.

- gen-locks.sh: re-add cuda-tile==1.5.0 + nccl4py==0.3.1 to the runtime .in;
  add mkdir -p .gen (script failed on a fresh checkout)
- locks/python-runtime.txt: regenerate with the two new hash-locked entries
  (cuda-tile->cuda.tile, nccl4py->nccl import names)
- deep-gemm/vllm-flash-attn have no aarch64 wheel and are not required by
  the fork; ray unused on the mp backend — left out of the aarch64 lock
- README: document the runtime completion and rationale

Verified on dgx3 against the leftover probe image: pip check clean (only the
intentional flashinfer 0.6.14<->0.6.15 override remains), all imports OK.
Alexander Korolev 2 kuukautta sitten
vanhempi
sitoutus
1bae27bd44

+ 9 - 0
docker-images/deepseek-v4-flash-dspark-src/README.md

@@ -43,6 +43,15 @@ torch 2.11 / flashinfer 0.6.12 and are therefore invalid for this stack).
 - The runtime lock pins flashinfer 0.6.14 (from the fork's `requirements/cuda.txt`)
   but we then install the **0.6.15 from-source wheel** over it — the built wheel
   wins. If pip objects to install-order, pin the runtime lock differently.
+- FlashInfer 0.6.15 is built from source and installed with `--no-deps`, so its
+  own `install_requires` are never auto-resolved into the lock. `gen-locks.sh`
+  therefore re-adds its hard transitive deps explicitly (**cuda-tile==1.5.0**)
+  and **nccl4py==0.3.1**) so `pip check` passes. `deep-gemm` (sdist-only) and
+  `vllm-flash-attn` (x86-only) have no aarch64 wheel and are not required by the
+  fork's vLLM, and `ray` is not needed on the `mp` distributed backend — so all
+  three stay out of the aarch64 runtime lock. Note the import names differ from
+  the PyPI names: cuda-tile → `cuda.tile`, nccl4py → `nccl`.
 - `overlay/` and `patches/` are intentionally empty (GLM-specific pieces dropped);
   add DS4 patches here if the fork needs a local fix.
 - Config/flags for serving mirror the fork's `serve-ds4-flash-spark.sh`.
+

+ 13 - 0
docker-images/deepseek-v4-flash-dspark-src/gen-locks.sh

@@ -33,6 +33,7 @@ common_flags=(--generate-hashes --python-version "$PY" --python-platform "$PLAT"
   --index-strategy unsafe-best-match)
 
 echo "==> python-build.txt (vLLM build deps, torch 2.12.0)"
+mkdir -p .gen
 # Also install the CUDA-side build companions the source builds need at build
 # time (tvm_ffi is required by flashinfer-cubin's backend; torch/compiler deps
 # come from the fork's own build/*.txt).
@@ -48,6 +49,18 @@ echo "==> python-runtime.txt (vLLM CUDA runtime deps)"
 sed -e '/flashinfer/I d' -e '/extra-index-url.*flashinfer[^ ]*/I d' \
   "$W/requirements/cuda.txt" \
   | sed "s|^-r common.txt|-r ${W}/requirements/common.txt|" > .gen/runtime.in
+# FlashInfer is stripped from the lock above (we build 0.6.15 from source and
+# install the wheel with --no-deps in the Dockerfile), so uv never sees its
+# install_requires. Re-add its hard transitive deps explicitly so `pip check`
+# passes: the runner installs them from this lock. cuda-tile/nccl4py resolve
+# to cp312 aarch64 wheels (deep-gemm / vllm-flash-attn / ray are not required
+# by the fork's vLLM and have no aarch64 build, so they stay out).
+cat >> .gen/runtime.in <<'EOF'
+
+# --- FlashInfer 0.6.15 transitive deps (built from source, installed --no-deps) ---
+cuda-tile==1.5.0
+nccl4py==0.3.1
+EOF
 uv pip compile "${common_flags[@]}" .gen/runtime.in \
   --output-file locks/python-runtime.txt
 

+ 42 - 1
docker-images/deepseek-v4-flash-dspark-src/locks/python-runtime.txt

@@ -684,13 +684,16 @@ cuda-core==1.0.1 \
     --hash=sha256:d9632db74eceb1cd72a7c95b61a5e4cfb9cc2291de0503e170334d936cab3316 \
     --hash=sha256:e0f1324486bb90be6bde28bd0afbaf78a38827948d37f93f90318a01da8a3f8c \
     --hash=sha256:e9b0f115a68f2f84c0f6d9b7e863a29517f6dfe5f7b7d07d1d9da8904754e9a2
-    # via cuda-python
+    # via
+    #   cuda-python
+    #   nccl4py
 cuda-pathfinder==1.6.0 \
     --hash=sha256:1503af579d8379c24bdd65528379bc57039b0455be9f5f9686cf8e473a1fce51
     # via
     #   cuda-bindings
     #   cuda-core
     #   cuda-python
+    #   nccl4py
 cuda-python==13.3.1 \
     --hash=sha256:280b014139ab447b6dd70a377db1596f310d6e887d9d342e6651b919ec145fb3
     # via
@@ -698,6 +701,26 @@ cuda-python==13.3.1 \
     #   nvidia-cutlass-dsl-libs-core
     #   nvidia-cutlass-dsl-libs-cu12
     #   nvidia-cutlass-dsl-libs-cu13
+cuda-tile==1.5.0 \
+    --hash=sha256:1088a3ebb5622c24ec32034d0d451bab9c1b85ae67fcdc647464951ec1d1b6ad \
+    --hash=sha256:16d97a60ed1d33388abbca85ea08cdae6325cc700476b3135f190d0fb50329f4 \
+    --hash=sha256:27da6113d3469de0b2f75dd269904e730b6d2bc81336addbd299c593d6a125c4 \
+    --hash=sha256:70ecc0e4be063317b5216dc620085be8021f78092a81613268129693cf63e179 \
+    --hash=sha256:81b8a93e757258260bd05dbbe6eec8bb50655ee1a88d5ebbc8412c526d3c0ed4 \
+    --hash=sha256:87652483baa9c81a9a24e4450f016e4ee78fd205d8422dad8996571bd1f2622e \
+    --hash=sha256:9494170237d34bbbce83f2ada005d2dabb704f1f8c6a0af59088c180bd1bf028 \
+    --hash=sha256:a4ede5529bd5e13318ec9bbf3f79abaf23b6368c58d247eaf2e5eb5ccae3fa73 \
+    --hash=sha256:b3c5e0a5af1347b6326fe7a49e44b15ea01ae2d8ed138617c8331b6aba311d16 \
+    --hash=sha256:b88d7a3ea0cb30a962c0ff9cb01e2b2b87c6ef816fd53dd92ead3bcff3449e37 \
+    --hash=sha256:bda5f1721a6daa45124033f031685d1b30439ea9dbb07e0d46ec2355cfde0657 \
+    --hash=sha256:c400918faa8492d84c4da3da81ce01ed30d81ed780f9ddbc1a9bdd588058b776 \
+    --hash=sha256:cc390ac00d2ecd5f7c2e26198b410787fa39baf3737c6abceac9bda3ca9fccef \
+    --hash=sha256:cef6d30acc37557643ece0de3770fc4c33497c4af40209e424f72fbfcbe6ea5a \
+    --hash=sha256:cfa4a5ef920d9c1fee702611b25bde449915f12bf929c1b8a3faee0c9b03f750 \
+    --hash=sha256:d4054dc12b6d35d69cb07fcc224183b84f3ad1a0e85ec4414cf660144b8467b0 \
+    --hash=sha256:d808355e4cb6a850c7e3e82a5cd656c0062c33225fce69a8fd40290bc5b0bcaa \
+    --hash=sha256:e7cb56186b0cc98166b72c7e5a3764c236151aa8d53e0b37a153766b79ea005a
+    # via -r .gen/runtime.in
 cuda-toolkit==13.0.2 \
     --hash=sha256:b198824cf2f54003f50d64ada3a0f184b42ca0846c1c94192fa269ecd97a66eb
     # via torch
@@ -1797,6 +1820,20 @@ multidict==6.7.1 \
     # via
     #   aiohttp
     #   yarl
+nccl4py==0.3.1 \
+    --hash=sha256:13db9f786c7919ed1df7079c03acbe49eb569d5625fd5cec2344075f37b5e140 \
+    --hash=sha256:15517f1255a84cf3f48d36e406ff925afa40425925a1d68a7672621286488e0a \
+    --hash=sha256:4f96117a0aed13744d2636760962f1cb45be9138846023b69c5a8053e531cc76 \
+    --hash=sha256:50068bb4e6f60dd831b2d394a9789f08a6f4346f0e51a9d717536868a8fdd398 \
+    --hash=sha256:5b684a3ac083fd76bf1e57e69e76575502bcd2aface23e2dad7a88461ce8916d \
+    --hash=sha256:7945acf8c0224f727f87db40eb3a6060ad7809256b0f37dde6b94d9d8fa6b65c \
+    --hash=sha256:7fd7862777777162f4735b85472951d91b8847cd7010d8f60bfefe58c7285583 \
+    --hash=sha256:a3115d8471cf4c207720c624174a0c023d8ef9893452310e6447dbc78a9e04ee \
+    --hash=sha256:aa09f12a93e0eb7b2dbbffbcb0a3daeeb3c211f2433cc6cc896faeec85ea4b2e \
+    --hash=sha256:c58bf4db2eb27636587b3ce899fe47d72c16bf1eeb76c5e1c9bb1feaf57048f5 \
+    --hash=sha256:d8e247d3a2b6e0253567322d518ec94320caa92649475416abceefaf0bc2db71 \
+    --hash=sha256:e0b1bab08b374ba21bb36612710866173e703c06dc197ab13b1e093436ac27ce
+    # via -r .gen/runtime.in
 networkx==3.6.1 \
     --hash=sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509 \
     --hash=sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762
@@ -1930,6 +1967,7 @@ numpy==2.3.5 \
     #   humming-kernels
     #   mistral-common
     #   ml-dtypes
+    #   nccl4py
     #   numba
     #   nvidia-cutlass-dsl-libs-base
     #   nvidia-cutlass-dsl-libs-core
@@ -2306,6 +2344,7 @@ packaging==26.2 \
     # via
     #   huggingface-hub
     #   lm-format-enforcer
+    #   nccl4py
     #   transformers
 partial-json-parser==0.2.1.1.post7 \
     --hash=sha256:145119e5eabcf80cbb13844a6b50a85c68bf99d376f8ed771e2a3c3b03e653ae \
@@ -4094,6 +4133,7 @@ typing-extensions==4.16.0 \
     #   anthropic
     #   anyio
     #   apache-tvm-ffi
+    #   cuda-tile
     #   fastapi
     #   grpcio
     #   httpx2
@@ -4101,6 +4141,7 @@ typing-extensions==4.16.0 \
     #   mcp
     #   mcp-types
     #   mistral-common
+    #   nccl4py
     #   nvidia-cutlass-dsl-libs-base
     #   nvidia-cutlass-dsl-libs-core
     #   nvidia-cutlass-dsl-libs-cu12