holoscan-install-source

작성자: nvidia

인트리 ./run 스크립트를 통해 Holoscan SDK를 소스에서 빌드합니다. 게시된 패키지가 사용자의 요구를 충족하지 못할 때만 사용하십시오.

npx skills add https://github.com/nvidia/skills --skill holoscan-install-source

Holoscan SDK — Build from Source

Purpose

Build the Holoscan SDK from the nvidia-holoscan/holoscan-sdk source tree using its ./run script (which builds inside a Docker container), producing a local install tree consumable as a CMake dependency.

Prerequisites

  • Linux host with NVIDIA GPU + driver (nvidia-smi).
  • git, Docker with NVIDIA Container Toolkit (docker run --gpus all works), and docker-buildx-plugin.
  • ~20 GB free disk for the build container + build/install trees.
  • 10–30 min for a clean first build.

Limitations

  • Only recommended when published packages (Conda / container / apt / wheel) don't fit — debug symbols, custom CMake options, or unsupported configs.
  • Still requires Docker — the ./run script builds inside a container; this is not a true bare-metal build.
  • Cross-compiling to aarch64 needs qemu-user-static on the host.

Step 0: Consult the Official Install Instructions

Always fetch the "Build from Source" section of https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html (and the linked GitHub README.md / DEVELOP.md for the chosen tag) before building. Extract: required ./run flags for the target architecture and CUDA major, supported branches/tags, any Dockerfile patches called out for the release, and the test names recommended for verification. If the doc disagrees with anything below, the doc wins.

Step 1: Prerequisites

Check that git and Docker (with GPU passthrough) are available:

git --version
docker --version
docker run --rm --gpus all ubuntu:22.04 nvidia-smi
  • If Docker is missing → help install from https://docs.docker.com/engine/install/
  • If GPU passthrough fails → install NVIDIA Container Toolkit:
    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
    curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \
      | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \
      | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
    sudo nvidia-ctk runtime configure --runtime=docker && sudo systemctl restart docker
    
  • If Docker buildx is missing: sudo apt-get install docker-buildx-plugin

Step 2: Clone the Repository

Clone repo to ~/holoscan/holoscan-sdk if needed

mkdir -p ~/holoscan/
git clone https://github.com/nvidia-holoscan/holoscan-sdk.git
cd ~/holoscan/holoscan-sdk

To build a specific release tag (recommended for stability):

git tag | grep -E '^v[0-9]' | sort -V | tail -5   # list recent tags
git checkout v<VERSION>                             # e.g. v4.1.0

Step 3: Build

The ./run build script handles container creation, CMake configuration, compilation, and install in one step. Warn the user this takes 10–30 minutes on first run (downloads base image + compiles).

./run build

Common options:

FlagPurpose
--type debugDebug build (symbols, no optimization)
--type RelWithDebInfoRelease + debug symbols
--arch aarch64Cross-compile for ARM64 (needs sudo apt install qemu-user-static)
--gpu igpuiGPU build for Jetson/IGX
--dryrunPreview commands without executing

If CMake cache errors occur after changing options:

./run clear_cache && ./run build

Output lands in these folders, and can be retrieved with ./run get_build_dir and ./run get_install_dir

  • Build dir: build-cu<N>-<arch>/
  • Install dir: install-cu<N>-<arch>/.

Step 4: Run Tests

Run the following tests

  • EXAMPLE_CPP_HELLO_WORLD_TEST
  • EXAMPLE_PYTHON_HELLO_WORLD_TEST
  • EXAMPLE_CPP_TENSOR_INTEROP_TEST
  • EXAMPLE_PYTHON_TENSOR_INTEROP_TEST
  • EXAMPLE_CPP_VIDEO_REPLAYER_TEST
  • EXAMPLE_PYTHON_VIDEO_REPLAYER_TEST
./run test

To run all six required tests at once, use a single-quoted regex (the | must be quoted to prevent bash from treating it as a pipe):

./run test --options "-R 'EXAMPLE_CPP_HELLO_WORLD_TEST|EXAMPLE_PYTHON_HELLO_WORLD_TEST|EXAMPLE_CPP_TENSOR_INTEROP_TEST|EXAMPLE_PYTHON_TENSOR_INTEROP_TEST|EXAMPLE_CPP_VIDEO_REPLAYER_TEST|EXAMPLE_PYTHON_VIDEO_REPLAYER_TEST' --output-on-failure"

Run a specific test by name or regex:

./run test --name <test_name>
./run test --options "-R '<regex>' --output-on-failure"
./run test --verbose

Important: Always single-quote the regex string when it contains | — without quotes, bash interprets | as a pipe and the command fails with command not found.

Expected: all tests pass. Note any failures and report them to the user before continuing.

Step 5: Point Applications at the Install Tree

Once built, applications can use the install tree as a CMake dependency. Give the user this path:

/path/to/holoscan-sdk/install-cu<N>-<arch>/

They can set Holoscan_ROOT or CMAKE_PREFIX_PATH to this directory when building their own applications.

Troubleshooting

SymptomFix
bash: <TEST_NAME>: command not found when running testsThe regex contains | — wrap it in single quotes: --options "-R '<regex>'"
CMake cache errors after option change./run clear_cache && ./run build
Docker buildx not foundsudo apt-get install docker-buildx-plugin
GPU not visible inside build containerVerify NVIDIA Container Toolkit and re-run sudo nvidia-ctk runtime configure --runtime=docker
Cross-compile fails (aarch64)Install qemu: sudo apt-get install qemu-user-static

nvidia의 다른 스킬

compileiq-debug
nvidia
무언가 잘못되었을 때 사용: Search()가 멈추거나, 모든 평가가 INVALID_SCORE를 반환하거나, 점수가 개선되지 않거나, 모든 설정이 동일한 숫자를 반환하거나, ptxas 오류 등이 발생할 때
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
compileiq-validate-result
nvidia
검색이 완료된 후, 속도 향상을 청구하거나 ACF를 발송하기 전에 사용합니다. dump_results CSV를 로드하고, 상위 K개 후보(단일 목표)를 추출합니다…
changelog-audit
nvidia
릴리스 전에 Warp CHANGELOG.md를 감사합니다: 누락된 항목 복구, 사용자 영향별 정렬, 항목 언어 다듬기, 줄 바꿈, (릴리스 브랜치 모드) 비교 업데이트…
maintain-dynamic-plugins
nvidia
NeMo Relay 동적 플러그인 로더, 매니페스트, Rust 네이티브 SDK, gRPC 워커 프로토콜, Python 워커 SDK, 문서, 테스트 및 릴리스 워크플로 커버리지를 유지 관리합니다.
dgx-diagnose
nvidia
일반적인 DGX Station GB300 문제 진단 — CUDA 충돌, 잘못된 GPU 타겟팅, vLLM/SGLang 컨테이너 버그, MIG 상태 문제, NVLink/Fabric Manager 오류,…