Răsfoiți Sursa

fix(docker): remove dangling hybrid_modelopt_ct import in glm52 image

The production-hybrid-1.4 base image patches
vllm/model_executor/layers/quantization/__init__.py to add
'from . import hybrid_modelopt_ct' but never ships hybrid_modelopt_ct.py.
This breaks ALL vllm imports with a circular-import error:

  ImportError: cannot import name 'hybrid_modelopt_ct' from partially
  initialized module 'vllm.model_executor.layers.quantization'

Root cause: the 1.4 image's __init__.py references a module that doesn't
exist anywhere in the image (confirmed: find / returns nothing). The 1.2
image (which works) only imports hybrid_mxfp4_ct. The quantization dir
contents are otherwise identical between 1.2 and 1.4.

Fix: sed-delete the dangling import line after FROM 1.4. No recipe uses
hybrid_modelopt_ct (all use hybrid_mxfp4_ct), so removal is safe. The
NF4 kernel (nf4_e8m0 in b12x_moe.py) that 1.4 adds over 1.2 is preserved.

Verified on dgx1: rebuilt :glm52 image imports vllm successfully
(0.11.2.dev279+eldritch.final), NF4 kernel present, running container
unaffected (uses old image ID).
Alexander Korolev 2 luni în urmă
părinte
comite
7515682095
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 7 0
      docker-images/glm52/Dockerfile

+ 7 - 0
docker-images/glm52/Dockerfile

@@ -10,6 +10,13 @@
 
 FROM aidendle94/sparkrun-vllm-ds4-gb10:production-hybrid-1.4
 
+# 1.4 patches quantization/__init__.py to `from . import hybrid_modelopt_ct`
+# but never ships hybrid_modelopt_ct.py — a build bug in the base image that
+# breaks all vLLM imports with a circular-import error. Remove the dangling
+# import; no recipe uses hybrid_modelopt_ct (all use hybrid_mxfp4_ct).
+RUN sed -i '/from . import hybrid_modelopt_ct/d' \
+    /opt/venv/lib/python3.12/site-packages/vllm/model_executor/layers/quantization/__init__.py
+
 RUN pip install --no-cache-dir --no-deps --force-reinstall nvidia-nccl-cu13==2.30.4 \
  && pip install --no-cache-dir --no-deps --force-reinstall instanttensor==0.1.9