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 allworks), anddocker-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
./runscript builds inside a container; this is not a true bare-metal build. - Cross-compiling to aarch64 needs
qemu-user-staticon 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:
- If Docker is missing → help install from https://docs.docker.com/engine/install/
- If GPU passthrough fails → install NVIDIA Container Toolkit:
- 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
To build a specific release tag (recommended for stability):
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).
Common options:
If CMake cache errors occur after changing options:
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
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 a specific test by name or regex:
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:
They can set Holoscan_ROOT or CMAKE_PREFIX_PATH to this directory when building their own applications.


