From d66475ca6740730c40bf4f9074a52c9106dc57ff Mon Sep 17 00:00:00 2001 From: Grecia Salazar Estrada Date: Wed, 4 Nov 2026 16:46:23 -0800 Subject: [PATCH] fix(camera_viz): keep one CuPy variant after setup installs dependencies On a CUDA 13 host setup targets cupy-cuda13x, but isaaccapture[cloudxr] depends on cupy-cuda12x, so the same install brings in both variants. The existing stale-variant removal runs before that install and cannot catch it. CuPy then warns about multiple CuPy packages and the CUDA check fails ("Selected CUDA 13, but CuPy loaded NVRTC 12.8"). After the install, remove any non-target variant again and reinstall the target, since the variants share the cupy/ directory. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Grecia Salazar Estrada (cherry picked from commit cc8d7e51603e5f703341dbae625b708121210af2) Signed-off-by: fvaloppi-nv --- examples/camera_viz/scripts/_install_deps.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/camera_viz/scripts/_install_deps.sh b/examples/camera_viz/scripts/_install_deps.sh index ceffb2ebb0..1d554d1ea1 100755 --- a/examples/camera_viz/scripts/_install_deps.sh +++ b/examples/camera_viz/scripts/_install_deps.sh @@ -579,6 +579,17 @@ else uv pip install --python "$PY" --upgrade "${PKGS[@]}" fi +# isaaccapture[cloudxr] depends on cupy-cuda12x, so on a CUDA 13 host the install +# above brings that variant back next to the target. Remove it again; the variants +# share the cupy/ directory, so reinstall the target afterwards. +for v in cupy-cuda11x cupy-cuda12x cupy-cuda13x; do + if [[ "$v" != "$target_cupy" ]] && uv pip show --python "$PY" "$v" >/dev/null 2>&1; then + step "removing $v pulled in by dependencies (target is $target_cupy)" + uv pip uninstall --python "$PY" "$v" >/dev/null + uv pip install --python "$PY" --reinstall-package "$target_cupy" "$target_cupy" + fi +done + # The example itself, so `python -m isaaccapture_examples.camera_viz` resolves # without the source directory on sys.path. Editable, so edits need no # reinstall -- and the native codec .so, built in place below, is picked up