holoscan-install-wheel
NVIDIA/skills
Instala el paquete «wheel» de Python del SDK de Holoscan mediante pip en un entorno virtual y comprueba su funcionamiento con los scripts de ejemplo.
...Expandir todoInstalación de la rueda Holoscan
Objetivo
Instalar los enlaces de Python del SDK de Holoscan mediante el paquete pip «holoscan-cu12 » o «holoscan-cu13 » en un entorno virtual y comprobar su funcionamiento con «hello_world » y «video_replayer».
Requisitos previos
- Linux x86_64 con GPU NVIDIA + controlador (
nvidia-smi). - Kit de herramientas CUDA en
la variable PATHque coincida con la versión principal de CUDA del host (12 o 13). - Python 3.10–3.13 con
venvdisponible. - Acceso a PyPI y
docs.nvidia.coma través de la red.
Limitaciones
- Solo Python. Para encabezados y bibliotecas de C++, utilízalo junto con
/holoscan-install-debian. holoscan-cu12yholoscan-cu13son mutuamente excluyentes: el archivo wheel debe coincidir con el controlador CUDA del sistema.- Los datos
de video_replayersolo se incluyen con el paquete de Debian; sin él, configuraHOLOSCAN_INPUT_PATHen un directorio que contengaracerx/. - Se recomienda ejecutar
`ulimit -s 32768` en todos los shells que ejecuten Holoscan; sin ello, algunas aplicaciones emiten una advertencia sobre el tamaño de la pila o, en casos más excepcionales, dan un error de segmento.
Paso 0: Consulta las instrucciones oficiales de instalación
Consulta siempre la sección «pip-wheel» de https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html antes de instalar. Extrae: los nombres exactos de los paquetes wheel (holoscan-cu12, holoscan-cu13), el rango de versiones de Python compatible con la versión actual, los requisitos previos que deben estar en PATH (CUDA Toolkit) y cualquier extra opcional (versiones específicas de LibTorch / ONNX Runtime). Si la documentación discrepa de cualquier punto que se indique a continuación, prevalecerá la documentación.
Es necesario tener ya determinada la variante de CUDA. Si no la conoces, ejecuta primero nvidia-smi 2>&1 | head -5.
Regla para la variante de CUDA: elige el paquete de pip:
| Versión de CUDA según nvidia-smi | Paquete de pip |
|---|---|
| 13.x+ | holoscan-cu13 |
| 12.x (cualquier GPU) | holoscan-cu12 |
Requisitos previos: CUDA Toolkit en la variable PATH, Python 3.10–3.13. Extras opcionales: LibTorch 2.11.0+, ONNX Runtime 1.22.0+.
Instálalo siempre en un entorno virtual de Python: así se evitan conflictos con los paquetes del sistema y es obligatorio en Ubuntu 24.04 (que bloquea por completo el uso de pip en todo el sistema).
Paso 1: Crear y activar el entorno virtual (venv)
Comprueba primero si ya existe uno:
ls ~/holoscan/venv 2>/dev/null && echo "existe" || echo "no existe"
Si no existe:
python3 -m venv ~/holoscan/venv
A continuación, actívalo:
source ~/holoscan/venv/bin/activate
Paso 2: Instalar
pip install holoscan-cu12 # o holoscan-cu13
Paso 3: Verificar
El entorno venv debe estar activo para todos los comandos que aparecen a continuación.
# Importación básica — se espera: cadena de versión, p. ej., «4.1.0»
# La advertencia de tiempo de ejecución sobre el tamaño de la pila (RuntimeWarning) es inofensiva; se suprime con ulimit -s 32768.
python3 -c "import holoscan; print(holoscan.__version__)"
# Obtener ejemplos de Python de GitHub con la etiqueta de la versión instalada.
# Se trata de ejemplos oficiales de NVIDIA, obtenidos a través de HTTPS y vinculados a la etiqueta
# que coincide con el archivo wheel instalado (v${SDK_VER}). Antes de ejecutarlos, avisa al usuario
# que está a punto de descargar y ejecutar scripts de ejemplo remotos desde esta URL. Si
# se niega o no se puede acceder a GitHub, pasa directamente a explorar los ejemplos en el paso 4.
SDK_VER=$(python3 -c "import holoscan; print(holoscan.__version__)")
BASE="https://raw.githubusercontent.com/nvidia-holoscan/holoscan-sdk/v${SDK_VER}/examples"
# hello_world — resultado esperado: «Hello World!»
curl -fsSL "${BASE}/hello_world/python/hello_world.py" -o /tmp/hs_hello_world.py
ulimit -s 32768 && python3 /tmp/hs_hello_world.py
# video_replayer (10 fotogramas, sin interfaz gráfica) — resultado esperado: "Ejecución del gráfico finalizada."
# Ejecutar siempre sin interfaz gráfica: funciona con o sin pantalla, evita los errores de la interfaz gráfica a través de SSH.
curl -fsSL "${BASE}/video_replayer/python/video_replayer.py" -o /tmp/hs_video_replayer.py
curl -fsSL "${BASE}/video_replayer/python/video_replayer.yaml" -o /tmp/hs_video_replayer.yaml
python3 -c "
c = open('/tmp/hs_video_replayer.yaml').read()
c = c.replace('count: 0','count: 10').replace('repeat: true','repeat: false').replace('realtime: true','realtime: false')
c = c.replace('holoviz:\n width: 854','holoviz:\n headless: true\n width: 854')
open('/tmp/hs_video_replayer_run.yaml','w').write(c)"
ulimit -s 32768 && HOLOSCAN_INPUT_PATH=/opt/nvidia/holoscan/data \
python3 /tmp/hs_video_replayer.py --config /tmp/hs_video_replayer_run.yaml
Nota: video_replayer necesita los archivos de datos de racerx. Estos se incluyen con el paquete de Debian en /opt/nvidia/holoscan/data. Si el paquete de Debian no está instalado, ejecuta primero `sudo /opt/nvidia/holoscan/examples/download_example_data ` (para este script es necesario que el paquete `apt` esté instalado), o configura `HOLOSCAN_INPUT_PATH ` con la ruta donde se encuentren los datos.
Paso 4: Recordatorio para el usuario
Debe activar el entorno venv en cada nueva sesión de terminal:
source ~/holoscan/venv/bin/activate
ulimit -s 32768 # suprime la advertencia sobre el tamaño de la pila
A continuación, indícale los siguientes pasos:
- Explora los ejemplos de Python en
https://github.com/nvidia-holoscan/holoscan-sdk/tree/v/examples - Sigue paso a paso un ejemplo concreto:
/explain-example - Empieza a crear una aplicación personalizada de Holoscan
Solución de problemas
- Errores al ejecutar
«pip install holoscan-cu12» con «externally-managed-environment». Ubuntu 24.04 bloquea el uso de pip en todo el sistema. Crea y activa primero el entorno venv del paso 1. ImportError/ CUDA incorrecta alimportar holoscan. La variante del paquete wheel no coincide con la CUDA del host. Desinstala y vuelve a instalar la que coincida:pip uninstall -y holoscan-cu13 && pip install holoscan-cu12(o viceversa).RuntimeWarning: tamaño de la pila...No es grave, pero configura«ulimit -s 32768»en el shell actual para que deje de aparecer.- Error de segmentación al ejecutar un ejemplo. No se había establecido
ulimit -s 32768. Configúralo antes de ejecutarpython3.... video_replayerno encuentraracerx/.HOLOSCAN_INPUT_PATHno apunta a un directorio que lo contenga. Instala el paquete de Debian para/opt/nvidia/holoscan/data, o configuraHOLOSCAN_INPUT_PATHpara que apunte a la ubicación donde se encuentren los datos.fuente: no existe tal archivo: ~/holoscan/venv/bin/activateen un nuevo shell. No se ha creado el entorno venv o la ruta es incorrecta. Vuelve a ejecutar el paso 1 o corrige la ruta.
---
name: holoscan-install-wheel
description: Install the Holoscan SDK Python wheel via pip into a virtual environment and verify with example scripts.
license: Apache-2.0
---
# Holoscan pip Wheel Installation
## Purpose
Install the Holoscan SDK Python bindings via the `holoscan-cu12` / `holoscan-cu13` pip wheel into a virtual environment, and verify with `hello_world` and `video_replayer`.
## Prerequisites
- Linux x86_64 with NVIDIA GPU + driver (`nvidia-smi`).
- CUDA Toolkit on `PATH` matching the host CUDA major (12 or 13).
- Python 3.10–3.13 with `venv` available.
- Network access to PyPI and `docs.nvidia.com`.
## Limitations
- Python only. For C++ headers/libs, pair with `/holoscan-install-debian`.
- `holoscan-cu12` and `holoscan-cu13` are mutually exclusive — wheel must match host CUDA driver.
- `video_replayer` data ships only with the Debian package; without it, set `HOLOSCAN_INPUT_PATH` to a directory containing `racerx/`.
- `ulimit -s 32768` is recommended in every shell that runs Holoscan — without it some apps emit a stack-size warning or, in rarer cases, segfault.
## Step 0: Consult the Official Install Instructions
Always fetch the pip-wheel section of `https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html` before installing. Extract: exact wheel package names (`holoscan-cu12`, `holoscan-cu13`), the supported Python range for the current release, prerequisites that must be on `PATH` (CUDA Toolkit), and any optional extras (LibTorch / ONNX Runtime version pins). If the doc disagrees with anything below, the doc wins.
You need the CUDA variant already determined. If not known, run `nvidia-smi 2>&1 | head -5` first.
**CUDA variant rule — pick the pip package:**
| nvidia-smi CUDA Version | pip package |
|------------------------|-------------|
| 13.x+ | `holoscan-cu13` |
| 12.x (any GPU) | `holoscan-cu12` |
Prerequisites: CUDA Toolkit on PATH, Python 3.10–3.13. Optional extras: LibTorch 2.11.0+, ONNX Runtime 1.22.0+.
Always install into a Python virtual environment — this avoids system-package conflicts and is required on Ubuntu 24.04 (which blocks system-wide pip entirely).
## Step 1: Create and Activate the venv
Check if one exists first:
```bash
ls ~/holoscan/venv 2>/dev/null && echo "exists" || echo "missing"
```
If missing:
```bash
python3 -m venv ~/holoscan/venv
```
Then activate:
```bash
source ~/holoscan/venv/bin/activate
```
## Step 2: Install
```bash
pip install holoscan-cu12 # or holoscan-cu13
```
## Step 3: Verify
The venv must be active for all commands below.
```bash
# Basic import — expected: version string, e.g. "4.1.0"
# The stack-size RuntimeWarning is harmless; ulimit -s 32768 suppresses it.
python3 -c "import holoscan; print(holoscan.__version__)"
# Fetch Python examples from GitHub at the installed version tag.
# These are official NVIDIA examples, fetched over HTTPS and pinned to the tag
# matching the installed wheel (v${SDK_VER}). Before running them, tell the user
# you're about to download and execute remote example scripts from this URL. If
# they decline or GitHub is unreachable, skip to browsing the examples in Step 4.
SDK_VER=$(python3 -c "import holoscan; print(holoscan.__version__)")
BASE="https://raw.githubusercontent.com/nvidia-holoscan/holoscan-sdk/v${SDK_VER}/examples"
# hello_world — expected: "Hello World!"
curl -fsSL "${BASE}/hello_world/python/hello_world.py" -o /tmp/hs_hello_world.py
ulimit -s 32768 && python3 /tmp/hs_hello_world.py
# video_replayer (10 frames, headless) — expected: "Graph execution finished."
# Always run headless: works with or without a display, avoids GUI failure modes over SSH.
curl -fsSL "${BASE}/video_replayer/python/video_replayer.py" -o /tmp/hs_video_replayer.py
curl -fsSL "${BASE}/video_replayer/python/video_replayer.yaml" -o /tmp/hs_video_replayer.yaml
python3 -c "
c = open('/tmp/hs_video_replayer.yaml').read()
c = c.replace('count: 0','count: 10').replace('repeat: true','repeat: false').replace('realtime: true','realtime: false')
c = c.replace('holoviz:\n width: 854','holoviz:\n headless: true\n width: 854')
open('/tmp/hs_video_replayer_run.yaml','w').write(c)"
ulimit -s 32768 && HOLOSCAN_INPUT_PATH=/opt/nvidia/holoscan/data \
python3 /tmp/hs_video_replayer.py --config /tmp/hs_video_replayer_run.yaml
```
Note: `video_replayer` needs the racerx data files. These ship with the Debian package at `/opt/nvidia/holoscan/data`. If the Debian package is not installed, run `sudo /opt/nvidia/holoscan/examples/download_example_data` first (requires the apt package to be installed for that script), or set `HOLOSCAN_INPUT_PATH` to wherever the data lives.
## Step 4: Remind the User
They must activate the venv in each new shell session:
```bash
source ~/holoscan/venv/bin/activate
ulimit -s 32768 # suppress stack-size warning
```
Then offer next steps:
- Explore Python examples at `https://github.com/nvidia-holoscan/holoscan-sdk/tree/v<VERSION>/examples`
- Walk through a specific example: `/explain-example`
- Start building a custom Holoscan application
## Troubleshooting
- **`pip install holoscan-cu12` errors with "externally-managed-environment".** Ubuntu 24.04 blocks system-wide pip. Create and activate the venv from Step 1 first.
- **`ImportError` / wrong CUDA at `import holoscan`.** Wheel variant doesn't match host CUDA. Uninstall and reinstall the matching one: `pip uninstall -y holoscan-cu13 && pip install holoscan-cu12` (or vice versa).
- **`RuntimeWarning: stack size ...`.** Harmless, but set `ulimit -s 32768` in the current shell to silence it.
- **Segmentation fault when running an example.** `ulimit -s 32768` wasn't set. Set it before `python3 ...`.
- **`video_replayer` can't find `racerx/`.** `HOLOSCAN_INPUT_PATH` isn't pointing at a directory containing it. Install the Debian package for `/opt/nvidia/holoscan/data`, or set `HOLOSCAN_INPUT_PATH` to wherever the data lives.
- **`source: no such file: ~/holoscan/venv/bin/activate` in a new shell.** Venv wasn't created or path differs. Re-run Step 1 or correct the path.
Todos los archivos
5 archivosInstalar holoscan-install-wheel
Descarga y descomprime los archivos de habilidades en tu directorio .claude/skills/.
Descargar ZIPClona el repositorio y copia los archivos de la habilidad a tu proyecto.
git clone https://github.com/NVIDIA/skills/tree/main/skills/holoscan-install-wheel # Copy SKILL.md to your .claude/skills/ directory
Copiar





Hogar
