camera_viz setup fails with a distro CUDA toolkit: "Cannot determine the CUDA toolkit version at /usr"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with examples/camera_viz/scripts/check_cuda.py, _install_deps.sh, and camera_viz.sh; then read tests/python/examples/camera_viz/test_cuda_setup.py and the CUDA lookup notes in docs/source/references/camera_streaming.rst. Reproduce the distro layout and PATH ordering cases described in the issue, then check how the detected root reaches CuPy during setup and viewer runs. Done means detection and runtime checks work for the reported layouts and the tests and docs cover the behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
examples/camera_viz/camera_viz.sh setup aborts on machines where CUDA comes from the Ubuntu/Debian nvidia-cuda-toolkit package. The toolkit works: the same machine builds Isaac Capture from source with BUILD_VIZ=ON, and build_from_source/index.rst lists nvidia-cuda-toolkit as a supported way to get it. Fixing version detection alone is not enough. With CuPy 14, the viewer also needs CUDA_PATH=/usr at runtime to find the headers.
=== Local setup ===
CUDA check failed: Cannot determine the CUDA toolkit version at /usr. Install the toolkit matching your JetPack/driver and set CUDA_PATH to its directory, then rerun setup.
error: CUDA toolkit detection failed
Environment
- Ubuntu 24.04, x86_64, RTX 6000 Ada, driver 580
nvidia-cuda-toolkit12.0.140 from the Ubuntu archive; no/usr/local/cuda*;CUDA_PATHunset/usr/bin/nvccis a#!/bin/shwrapper around/usr/lib/nvidia-cuda-toolkit/bin/nvcc- Headers are in
/usr/include, andlibnvrtc.so.12is in/usr/lib/x86_64-linux-gnu - main at 1339a9cd3
Steps to reproduce
Detection alone (system Python, the way setup calls it):
python3 examples/camera_viz/scripts/check_cuda.py --detect
# CUDA check failed: Cannot determine the CUDA toolkit version at /usr. ...
CUDA_PATH=/usr python3 examples/camera_viz/scripts/check_cuda.py --detect
# same error: no CUDA_PATH value is accepted for this layout
The kernel check that setup runs last, in a venv with the CuPy that setup installs:
uv venv /tmp/cupy-venv && uv pip install --python /tmp/cupy-venv/bin/python cupy-cuda12x numpy
/tmp/cupy-venv/bin/python examples/camera_viz/scripts/check_cuda.py --cuda-major 12
# CUDA check failed: Failed to find CUDA headers. ... specify CUDA_PATH environment variable.
CUDA_PATH=/usr /tmp/cupy-venv/bin/python examples/camera_viz/scripts/check_cuda.py --cuda-major 12
# CuPy kernel check passed: NVIDIA RTX 6000 Ada Generation, CuPy 14.2.0, NVRTC 12.0
Root cause
There are two independent gaps. Each one blocks this layout on its own.
1. Setup cannot read the toolkit version. detect_toolkit() picks a root from CUDA_PATH, else dirname(dirname(nvcc)) for the first nvcc on PATH, else /usr/local/cuda. It then reads the version only from <root>/version.json, <root>/version.txt or a cuda-X.Y directory name. The distro layout roots at /usr and has none of the three. _install_deps.sh:92 treats the error as fatal.
Two more consequences of the same logic:
- Only the first
nvcconPATHis considered, with no fallback. A machine with an official toolkit and a distronvccearlier onPATHfails the same way. - The pip
nvidia-cuda-nvcc-cu12wheel ships nonvccbinary. A machine whose CUDA comes only from pip wheels falls through to/usr/local/cudaand fails too, even though CuPy can run from those wheels.
CMake's FindCUDAToolkit is not affected, because it gets the version by running nvcc --version.
2. CuPy 14 does not find distro headers on its own. Setup installs an unpinned cupy-cuda12x, which is currently 14.2.0. CuPy 14.2.0 locates headers through cuda.pathfinder (1.8.4 here), which searches, in order: NVIDIA wheels in site-packages, conda, CUDA_PATH/CUDA_HOME, a root derived from the loaded libcudart, and fixed system directories. On this layout only CUDA_PATH=/usr resolves to /usr/include. CuPy 13.6 derived its root from nvcc on PATH and passes the same kernel check without CUDA_PATH. Nothing in setup or camera_viz.sh exports CUDA_PATH. So even with gap 1 fixed, the final setup check, camera_viz.sh run and the camera_viz GPU tests all fail with "Failed to find CUDA headers".
Regression
Setup started failing with #1194 (bb59d39b6). Before it, setup defaulted to CUDA 12.0 unless /usr/local/cuda pointed at a cuda-X.Y directory. On this machine that picked cupy-cuda12x and finished. Whether the viewer then worked depended on the CuPy release resolved: 13.6.0 runs kernels on this layout without CUDA_PATH, and 14.2.0 does not. #1194 moved that runtime failure into setup, and its detection rejects CUDA_PATH=/usr, which is the value CuPy 14 needs.
Who is affected
- Distro
nvidia-cuda-toolkitinstalls, including users who followedbuild_from_source/index.rst.setup --build-from-sourcepoints at that same page, but detection fails before setup reaches the build. - Machines where a distro
nvccprecedes an official toolkit onPATH. - Machines whose CUDA comes only from pip wheels.
- Every setup mode is affected,
--sender-onlyincluded, because detection runs unconditionally. - Not affected, by inspection of the logic: the official runfile/deb installers and JetPack (
/usr/local/cuda-X.Ywith a version file). Conda layouts were not checked.
Suggested fix
- Detection. When no version file is present, parse
nvcc --version, as CMake does. Treat a distronvccas rooted at/usronce/usr/include/cuda_runtime.hexists. Try eachnvcconPATH, then/usr/local/cuda, and use the first one that resolves, rather than only the firstnvccfound. - Runtime. Export the detected root as
CUDA_PATHfor setup's kernel check and forcamera_viz.sh run/loopback, so setup verifies the environment the viewer will use. One way is to write it next to the venv and source it incamera_viz.sh; setting it in the generated.venv/bin/activatewould cover users who activate the venv.- Alternative: install
cupy-cuda12x[ctk]so CuPy takes headers and NVRTC from wheels. This decouples CuPy from the system layout, but makes the venv much larger and needs checking on Jetson.
- Alternative: install
- Messages and docs. Drop "JetPack" from the desktop error, or make it conditional, and say which layouts are recognized. Update
camera_streaming.rst:82-84, which currently describes setup's lookup order but not the layouts it accepts or what CuPy needs at runtime. - Tests. Extend
tests/python/examples/camera_viz/test_cuda_setup.pywith a distro layout (annvccwrapper under a temporaryusr/bin,nvcc --versionstubbed) and aPATHordering case.
Workaround
Give setup a cuda-X.Y directory to read the version from, and give CuPy headers through it. The name must match the installed toolkit:
mkdir -p ~/.local/cuda-12.0 && ln -s /usr/include ~/.local/cuda-12.0/include
export CUDA_PATH=~/.local/cuda-12.0 # keep it set for setup and for every run
With this, check_cuda.py --detect and check_cuda.py --cuda-major 12 both pass on the machine above. A full setup run with the workaround has not been tested.
- Lenguaje dominante
- Python
- Estrellas
- 412
- Forks
- 97
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 157
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/IsaacCapture
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
NVIDIA/IsaacCapture#910 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
NVIDIA/IsaacCapture#891 ·
Los mantenedores suelen responder en 1 día
-
Expose per-glove health and data freshness in the Avatar SDK and Isaac Teleop pluginPosiblemente ocupada @zihanjiang321 la tomó hace 1 día. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NVIDIA/IsaacCapture#1319 ·
Los mantenedores suelen responder en 1 día
-
Add OneRobotics A1 asset and Isaac Teleop examplePosiblemente ocupada @WangXuechun-woan la tomó hace 8 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NVIDIA/IsaacCapture#1291 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
NVIDIA/IsaacCapture#1217 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/IsaacCapture
Issues similares
-
fix(ui): serve bundled fonts from the gatewayPosiblemente ocupada @dkritarth la tomó hoy. Abiertoagent: in-progress agent: ready P3 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dkritarth/scopewatch#336 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bob
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
khuisman/mcp-gee-sweet#1267 ·
Los mantenedores suelen responder en 1 día
-
bug confirmed issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
open-webui/open-webui#33285 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
tv-list
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Gathin23/cleanyourtv#2337 ·
Los mantenedores suelen responder en 1 día
-
bug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día