Skip to content

fix: Cherry-pick #14361 - #14928

Merged
nv-nmailhot merged 1 commit into
release/1.5.0from
yunzhoul/cherrypick-150-14361
Sep 16, 2026
Merged

nv-nmailhot merged 1 commit into
release/1.5.0from
yunzhoul/cherrypick-150-14361

Conversation

@yunzhoul-nv

Copy link
Copy Markdown
Contributor

Cherry-pick #14361

Signed-off-by: Yunzhou (David) Liu <[email protected]>
@yunzhoul-nv
yunzhoul-nv requested review from a team as code owners September 16, 2026 07:32
@copy-pr-bot

copy-pr-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added fix documentation Improvements or additions to documentation multimodal container labels Sep 16, 2026
"vllm", "opencv-python-headless", "cv2", codec, cause=str(exc)
) from exc
except (OSError, SystemError, ValueError) as exc:
# Confirm both the error source and missing video support.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment merely restates the two predicates in the immediately following condition and adds no lasting constraint or rationale.

🤖 AI Fix

Remove this redundant comment.

@nv-nmailhot
nv-nmailhot merged commit e089c1c into release/1.5.0 Sep 16, 2026
23 of 24 checks passed
@nv-nmailhot
nv-nmailhot deleted the yunzhoul/cherrypick-150-14361 branch September 16, 2026 21:59

@dmitry-tokarev-nv dmitry-tokarev-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Faithful pick onto release/1.5.0, verified by execution. No findings.

Diffed against the merge commit of #14361 (c76d320). Every added and removed line is byte-identical.

Fidelity: every added and removed line is byte-identical

diff of the added-line set and the removed-line set between the two patches is empty. 11 of the 13 files land byte-identical in content to the state at c76d320.

Difference Class
vllm_runtime.Dockerfile hunk offsets @@ -468 to @@ -463 Mechanical. This branch lacks the libjemalloc2 line and the cpu compliance gate, so the file is 5 lines shorter above the hunk.
pyproject.toml blob hash, same @@ -459 offset Mechanical. The branch pins older TensorRT-LLM and SGLang releases elsewhere in the file.
container/templates/vllm_runtime.Dockerfile and pyproject.toml post-state Pre-existing branch divergence, none of it inside the picked hunks.

No conflict resolution, no adaptation, no unexplained edit.

Assumptions hold: the branch pins the same engine the original was built against

Both container/context.yaml files, compared symbol by symbol:

Lane release/1.5.0 today main at c76d320
vllm cuda13.0 runtime v0.28.0-ubuntu2404 v0.28.0-ubuntu2404
vllm xpu runtime v0.27.1 v0.27.1
vllm cpu runtime v0.28.0 v0.28.0

The original merged against the same pins this branch carries, so no version claim in it is stale here.

Symbols the change calls, checked on the branch tree:

  • installer_covers is added by this same patch. _OPENCV, _PYAV and _BACKEND_DECODERS["vllm"] already exist at install_media_decoders.py:110-141.
  • SITE_PACKAGES is set in the same RUN at vllm_runtime.Dockerfile:482, above the new guard at line 502.
  • The whole rebuild sits inside {% if device == "cuda" %} (lines 458 to 514), which matches torch.version.cuda is not None in the image test.
  • torch.version.cuda reads 13.0 in the vLLM runtime-test image, with no GPU visible.

Measured on vllm/vllm-openai:v0.28.0-ubuntu2404, the exact cuda pin of this branch:

RESOLVED_OPENCV_VERSION=5.0.0.93
FFMPEG: YES
/usr/local/lib/python3.12/dist-packages/opencv_python_headless.libs

The version probe in the Dockerfile resolves the version the guards expect.

media_io.kwargs on that same image, which is the setting the new _attributable_to_cv2 reads:

{}                                     -> kwargs={}
{'backend': 'pyav'}                    -> kwargs={'backend': 'pyav'}
{'video_backend': 'opencv'}            -> kwargs={}
{'backend':'pyav','video_backend':'opencv'} -> kwargs={'backend': 'pyav'}

backend stays in kwargs and selects the decode mixin. video_backend is popped and selects the loader. VideoMediaIO.load_bytes declares backend ... = "opencv", so the .get("backend", "opencv") default is right. The code reads the correct one.

The defect exists on this branch, reproduced

A shipped Dynamo vLLM runtime image built from the pre-pick logic:

$ docker run --rm nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.4.2 python3 -c "import cv2"
ModuleNotFoundError: No module named 'cv2'

The pinned base ships opencv-python-headless 5.0.0.93 with FFMPEG: YES, and the pre-pick purge removes it whole. So this branch has the gap the pick closes. It is not a no-op here.

Tests run on this branch, and they turn red when the fix is mutated

Run in the vLLM runtime-test image on AMD64, with the branch tree overlaid on PYTHONPATH. Marker selection measured, not read:

Tree -m "unit and pre_merge and gpu_0"
base (ffd7c1a) 72 passed
head (7c6942b) 85 passed
head, whole multimodal plus installer suite 215 passed, 25 deselected

Mutation controls on the head tree:

Mutation Result
_is_vllm_source_built_cv2 forced to return False 5 failed, 210 passed
except (OSError, SystemError, ValueError) narrowed to SystemError, and the installer wheel-only arm deleted 3 failed, 212 passed

The lane is vllm-runtime / Test cuda13.0 for the unit tests. The image-level test test_vllm_image_ships_no_software_video_codecs runs in the same lane and keys on torch.version.cuda, so the cuda lane asserts a codec-free OpenCV is present and the cpu and xpu lanes keep asserting it is absent. The xpu lane filter is vllm and pre_merge and not multimodal, which does not deselect that test, and its behavior there is unchanged from the base branch.

Nothing was left behind

#14361 merged as one squash commit. No later pull request corrects it: the only commit on main that touches these files afterwards is #14543, the v0.29.0 preparation, and it changes unrelated blocks (Transformers and tokenizers alignment, FFmpeg copy gating).

Verification stopped at the image build. I did not rebuild OpenCV from source. I checked its inputs against the real pinned base, and the same build on the same base tag passed vllm-runtime / Build, Test cuda13.0, amd64 and Compliance audit on #14361.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container documentation Improvements or additions to documentation fix multimodal size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants