holoscan-install-wheel
NVIDIA/skills
pip을 사용하여 가상 환경에 Holoscan SDK Python 휠을 설치하고, 예제 스크립트를 통해 정상 작동 여부를 확인하십시오.
...모든 것을 확장하십시오홀로스캔 핍 휠 설치
목적
holoscan-cu12 / holoscan-cu13 pip 휠을 통해 가상 환경에 Holoscan SDK Python 바인딩을 설치하고, hello_world 및 video_replayer로 정상 작동 여부를 확인합니다.
필수 조건
- NVIDIA GPU 및 드라이버(
nvidia-smi)가 설치된 Linux x86_64 환경. - 호스트 CUDA 메이저 버전(12 또는 13)과 일치하는 CUDA 툴킷이
PATH에 설정되어 있어야 합니다. venv를사용할 수 있는 Python 3.10–3.13.- PyPI 및
docs.nvidia.com에 대한 네트워크 접속이 가능해야 합니다.
제한 사항
- Python 전용입니다. C++ 헤더/라이브러리를 사용하려면
/holoscan-install-debian과함께 사용하십시오. holoscan-cu12와holoscan-cu13은상호 배타적입니다. wheel은 호스트 CUDA 드라이버와 일치해야 합니다.video_replayer데이터는 Debian 패키지와 함께만 제공됩니다. 이 데이터가 없는 경우,HOLOSCAN_INPUT_PATH를racerx/가포함된 디렉터리로 설정하십시오.- Holoscan을 실행하는 모든 셸에서
ulimit -s 32768을사용하는 것이 좋습니다. 이 설정을 하지 않으면 일부 앱에서 스택 크기 경고가 발생하거나, 드물게 세그폴트가 발생할 수 있습니다.
0단계: 공식 설치 지침 참조
설치하기 전에 항상 https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html 의 pip-wheel 섹션을 확인하십시오. 요약: 정확한 휠 패키지 이름(holoscan-cu12, holoscan-cu13), 현재 릴리스에서 지원되는 Python 범위, PATH에 반드시 포함되어야 하는 필수 전제 조건(CUDA 툴킷), 그리고 선택적 추가 사항(LibTorch / ONNX 런타임 버전 고정)을 확인하세요. 문서 내용과 아래 내용이 상충할 경우, 문서의 내용이 우선합니다.
이미 결정된 CUDA 변형이 필요합니다. 알 수 없는 경우, 먼저 nvidia-smi 2>&1 | head -5를 실행하십시오.
CUDA 변형 규칙 — pip 패키지 선택:
| nvidia-smi CUDA 버전 | pip 패키지 |
|---|---|
| 13.x+ | holoscan-cu13 |
| 12.x (모든 GPU) | holoscan-cu12 |
필수 조건: PATH에 CUDA 툴킷이 설정되어 있어야 하며, Python 3.10–3.13이 설치되어 있어야 합니다. 선택적 추가 구성 요소: LibTorch 2.11.0 이상, ONNX 런타임 1.22.0 이상.
항상 Python 가상 환경에 설치하십시오. 이렇게 하면 시스템 패키지 충돌을 방지할 수 있으며, Ubuntu 24.04(시스템 전체에서 pip를 완전히 차단함)에서는 필수입니다.
1단계: venv 생성 및 활성화
먼저 가상 환경이 있는지 확인하세요:
ls ~/holoscan/venv 2>/dev/null && echo "존재함" || echo "없음"
존재하지 않는 경우:
python3 -m venv ~/holoscan/venv
그런 다음 활성화합니다:
source ~/holoscan/venv/bin/activate
2단계: 설치
pip install holoscan-cu12 # 또는 holoscan-cu13
3단계: 확인
아래의 모든 명령을 실행하려면 venv가 활성화되어 있어야 합니다.
# 기본 임포트 — 예상 결과: 버전 문자열(예: "4.1.0")
# 스택 크기 관련 RuntimeWarning은 무해합니다. ulimit -s 32768을 실행하면 이 경고가 표시되지 않습니다.
python3 -c "import holoscan; print(holoscan.__version__)"
# 설치된 버전 태그에 해당하는 GitHub에서 Python 예제 가져오기.
# 이는 NVIDIA의 공식 예제로, HTTPS를 통해 가져오며 설치된 휠(v${SDK_VER})과 일치하는 태그에 고정됩니다.
# 실행하기 전에 사용자에게 다음 내용을 알리십시오.
# 이 URL에서 원격 예제 스크립트를 다운로드하여 실행할 예정임을 알려주십시오. 만약
# 사용자가 거부하거나 GitHub에 접속할 수 없는 경우, 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 — 예상 결과: "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 프레임, 헤드리스) — 예상 결과: "Graph execution finished."
# 항상 헤드리스 모드로 실행: 디스플레이 유무와 상관없이 작동하며, SSH를 통한 GUI 오류 발생을 방지합니다.
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
참고: video_replayer에는 racerx 데이터 파일이 필요합니다. 이 파일들은 Debian 패키지와 함께 /opt/nvidia/holoscan/data에 포함되어 있습니다. Debian 패키지가 설치되어 있지 않은 경우, 먼저 sudo /opt/nvidia/holoscan/examples/download_example_data를 실행하거나(이 스크립트를 실행하려면 apt 패키지가 설치되어 있어야 함), HOLOSCAN_INPUT_PATH를 데이터가 있는 위치로 설정하십시오.
4단계: 사용자에게 알리기
사용자는 새로운 셸 세션마다 venv를 활성화해야 합니다:
source ~/holoscan/venv/bin/activate
ulimit -s 32768 # 스택 크기 경고 억제
그런 다음 다음 단계를 안내하세요:
https://github.com/nvidia-holoscan/holoscan-sdk/tree/v에서 Python 예제를 살펴보세요/examples - 구체적인 예제를 단계별로 살펴보세요:
/explain-example - 맞춤형 Holoscan 애플리케이션 구축 시작
문제 해결
pip install holoscan-cu12실행 시 “externally-managed-environment” 오류가 발생합니다. Ubuntu 24.04는 시스템 전체의 pip 사용을 차단합니다. 먼저 1단계에서 설명한 대로 venv를 생성하고 활성화하십시오.ImportError/holoscan 임포트시 잘못된 CUDA. 휠 변형이 호스트 CUDA와 일치하지 않습니다. 일치하는 버전을 제거하고 다시 설치하세요:pip uninstall -y holoscan-cu13 && pip install holoscan-cu12(또는 그 반대).RuntimeWarning: 스택 크기 ....무해하지만, 경고 메시지를 표시하지 않도록 현재 셸에서ulimit -s 32768을설정하십시오.- 예제를 실행할 때 세그멘테이션 오류가 발생합니다.
ulimit -s 32768이설정되지 않았습니다.python3을실행하기 전에 이 설정을 적용하십시오.... video_replayer가racerx/를찾을 수 없습니다.HOLOSCAN_INPUT_PATH가해당 파일이 포함된 디렉터리를 가리키지 않습니다./opt/nvidia/holoscan/data용Debian 패키지를 설치하거나,HOLOSCAN_INPUT_PATH를데이터가 있는 위치로 설정하십시오.source: no such file: ~/holoscan/venv/bin/activate(새 셸에서). Venv가 생성되지 않았거나 경로가 다릅니다. 1단계를 다시 실행하거나 경로를 수정하십시오.
---
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.
모든 파일
5개 파일holoscan-install-wheel 설치
스킬 파일을 다운로드한 후 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/NVIDIA/skills/tree/main/skills/holoscan-install-wheel # Copy SKILL.md to your .claude/skills/ directory
복사





집
