Dockerfile 1.9 KB

12345678910111213141516171819202122232425262728293031323334
  1. # syntax=docker/dockerfile:1.7
  2. # DeepSeek-V4-Flash-DSpark — instanttensor on top of
  3. # aidendle94/sparkrun-vllm-ds4-gb10:production-3.76.1
  4. #
  5. # production-3.76.1 (same lineage as 3.75) ships the patched NCCL 2.30.4 ABI
  6. # (the base layers are byte-identical to production-3.2, which is labeled
  7. # "patched NCCL 2.30.4"), so no NCCL re-alignment is needed. This overlay adds
  8. # instanttensor for faster model loading (load-format instanttensor) plus the
  9. # deepseek_v4 encoder reasoning-effort fix (see patch COPY below).
  10. #
  11. # Build: cd docker-images/deepseek-v4-flash-dspark && docker build -t sparkrun-vllm-ds4-gb10:fixed .
  12. # Tag: docker tag sparkrun-vllm-ds4-gb10:fixed aidendle94/sparkrun-vllm-ds4-gb10:production-3.76.1
  13. FROM aidendle94/sparkrun-vllm-ds4-gb10:production-3.76.1
  14. RUN pip install --no-cache-dir --no-deps --force-reinstall instanttensor==0.1.9
  15. # production-3.76.1 itself ships a fixed deepseek_v4.py (layer LABEL
  16. # "org.375.overlay=3.76.1"): it names thinking/enable_thinking/reasoning_effort/
  17. # drop_thinking as explicit signature params so the vllm serving path
  18. # (supports_kw, allow_var_kwargs=False) no longer drops them — the root-cause
  19. # fix. So our vendored deepseek_v4.py is NOT needed on this base (it read the
  20. # same kwargs via **kwargs and was equally dropped).
  21. #
  22. # The bundled deepseek_v4_encoding.py is still the stale revision (single
  23. # REASONING_EFFORT_MAX wording, max used the high text, read the deprecated
  24. # `reasoning` key) — 3.76.1's overlay layers do not touch it. deepseek_v4_encoding.py
  25. # is therefore still replaced with the canonical model-card reference
  26. # (deepseek-ai/DeepSeek-V4-Flash-0731 encoding/encoding_dsv4.py): full low/high/max
  27. # prompt dict, correct gate for both high and max, and reasoning_content key.
  28. # Mirrors the encoder fix 0rand bundled into his local
  29. # production-3.75-reffix-0731 image (forums…/372268/708).
  30. COPY patches/deepseek_v4_encoding.py \
  31. /opt/venv/lib/python3.12/site-packages/vllm/tokenizers/