holoscan-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHoloscan SDK Setup
Holoscan SDK 安装设置
Purpose
目的
Determines the correct Holoscan SDK installation method for the current host by inspecting hardware, OS, CUDA driver, and existing tooling, then delegates to a method-specific install skill. Covers NGC container, Debian/apt, pip wheel, Conda, and source builds across Ubuntu, RHEL, IGX Orin, Jetson, and DGX Spark / Grace-Hopper platforms.
通过检查硬件、操作系统、CUDA驱动及现有工具,确定当前主机适用的Holoscan SDK正确安装方法,然后调用对应安装方法的专属技能。支持Ubuntu、RHEL、IGX Orin、Jetson和DGX Spark / Grace-Hopper平台上的NGC容器、Debian/apt、pip wheel、Conda及源码构建方式。
Prerequisites
前置条件
- Linux host (Ubuntu 22.04/24.04, RHEL 9.x, IGX Orin, Jetson, or DGX Spark / Grace-Hopper)
- NVIDIA GPU with a working driver (returns a CUDA Version)
nvidia-smi - Network access to and NGC
docs.nvidia.com - One of: Docker + NVIDIA Container Toolkit, , Python 3.10–3.13 with
apt, Conda, or a build toolchain — depending on chosen methodpip
- Linux主机(Ubuntu 22.04/24.04、RHEL 9.x、IGX Orin、Jetson或DGX Spark / Grace-Hopper)
- 配备正常驱动的NVIDIA GPU(可返回CUDA Version)
nvidia-smi - 可访问和NGC的网络权限
docs.nvidia.com - 根据所选安装方法,需具备以下工具之一:Docker + NVIDIA Container Toolkit、、带
apt的Python 3.10–3.13、Conda或构建工具链pip
Available Scripts
可用脚本
| Script | Purpose | Arguments |
|---|---|---|
| Detects Conda installs even when not on PATH (searches | none |
| Checks whether the NGC Holoscan container image for a given CUDA tag suffix is pulled or available. | |
Invoke scripts with and . Trust the script output over bare commands such as or .
run_script("scripts/check_conda.sh")run_script("scripts/check_ngc_image.sh", "cuda13")which condadocker images| 脚本 | 用途 | 参数 |
|---|---|---|
| 即使Conda不在PATH中也能检测到安装(搜索 | 无 |
| 检查指定CUDA标签后缀的NGC Holoscan容器镜像是否已拉取或可用。 | |
通过和调用脚本。优先信任脚本输出,而非或等原生命令。
run_script("scripts/check_conda.sh")run_script("scripts/check_ngc_image.sh", "cuda13")which condadocker imagesInstructions
操作说明
Be conversational and step-by-step — do not front-load all the information. Complete each step and report back before moving on.
采用对话式、分步式流程——不要一次性提供所有信息。完成每一步并反馈后再进行下一步。
Workflow rules (must follow)
工作流规则(必须遵守)
- End Step 5 with a bolded one-line recommendation that names the method (e.g. ).
**Recommendation:** NGC Container — bundles all deps, fastest path to a working install. - For a first-time user on a supported x86_64 host with Docker available, that recommendation must be NGC Container.
- After the recommendation, stop and ask which method to use. Do not paste ,
docker pull,docker run,apt install, or other install commands in that turn — those belong to the delegated install skill in Step 6.pip install - If the container path is in play, verify Docker + GPU passthrough yourself in Step 4 (run the command shown there). Do not ask the user to run or
nvidia-smifor you.docker --version
- 第5步结尾需给出加粗的单行推荐,明确安装方法(例如:)。
**推荐:** NGC容器 — 包含所有依赖项,是最快实现可用安装的路径。 - 对于支持的x86_64主机且已安装Docker的首次用户,必须推荐NGC容器。
- 给出推荐后,暂停并询问用户选择哪种安装方法。此步骤不要粘贴、
docker pull、docker run、apt install等安装命令——这些命令属于第6步中调用的专属安装技能。pip install - 如果考虑使用容器路径,需在第4步自行验证Docker + GPU直通功能(运行此处所示命令)。不要让用户帮你运行或
nvidia-smi。docker --version
Step 1: Read the Docs First
步骤1:先查阅文档
Fetch then to get the current release's supported platforms, package names, and install requirements. Do not rely on hardcoded assumptions.
https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html获取中的,了解当前版本支持的平台、包名称及安装要求。不要依赖硬编码的假设。
https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.htmlStep 2: Inspect the Machine
步骤2:检查主机设备
Run in parallel:
bash
uname -a && (lsb_release -a 2>/dev/null || cat /etc/os-release)
uname -m
nvidia-smi 2>&1 | head -10
nproc && free -h | head -2Key: Read the "CUDA Version" field from (top-right of the table header) — this is the maximum CUDA version the driver supports, and drives vs package selection.
nvidia-smicuda12cuda13并行运行以下命令:
bash
uname -a && (lsb_release -a 2>/dev/null || cat /etc/os-release)
uname -m
nvidia-smi 2>&1 | head -10
nproc && free -h | head -2关键: 从中读取"CUDA Version"字段(表格标题右上角)——这是驱动支持的最高CUDA版本,将决定选择还是包。
nvidia-smicuda12cuda13Step 3: Assess Compatibility
步骤3:评估兼容性
| Platform | Methods Available |
|---|---|
| Ubuntu 22.04/24.04, x86_64 | Container, Debian/apt, pip wheel, Conda, Source |
| RHEL 9.x, x86_64 | Container only |
| IGX Orin (ARM64) | Container, Debian/apt, Source |
| Jetson AGX Orin / Orin Nano | Container, Debian/apt (iGPU) |
| Jetson AGX Thor | Container, Debian/apt |
| DGX Spark / Grace-Hopper | Container (check docs for OS requirements) |
| Other Linux, x86_64 | Container may work; pip wheel if glibc ≥ 2.35 |
| 平台 | 可用安装方法 |
|---|---|
| Ubuntu 22.04/24.04,x86_64 | 容器、Debian/apt、pip wheel、Conda、源码 |
| RHEL 9.x,x86_64 | 仅容器 |
| IGX Orin(ARM64) | 容器、Debian/apt、源码 |
| Jetson AGX Orin / Orin Nano | 容器、Debian/apt(iGPU) |
| Jetson AGX Thor | 容器、Debian/apt |
| DGX Spark / Grace-Hopper | 容器(请查阅文档确认操作系统要求) |
| 其他Linux,x86_64 | 容器可能可用;若glibc ≥ 2.35则可使用pip wheel |
Step 4: Check Tools and Present Options
步骤4:检查工具并展示选项
Run in parallel:
bash
docker --version 2>&1 | head -1; python3 --version 2>&1; pip3 --version 2>&1
dpkg -l | grep holoscan || true
pip3 show holoscan 2>/dev/null | grep -E "^(Name|Version)" || true
~/holoscan/venv/bin/pip show holoscan 2>/dev/null | grep -E "^(Name|Version)" | sed 's/^/venv: /' || trueThen verify GPU passthrough yourself — do not ask the user to run this:
bash
docker run --rm --gpus all ubuntu:22.04 nvidia-smi 2>&1 | tail -5 || trueInterpret the result for the Status column in Step 5:
- missing → container row Status
docker.✗ — Docker not installed - Docker present but →
could not select device driver "nvidia".✗ — NVIDIA Container Toolkit missing - output appears →
nvidia-smi.✓
Then invoke the detection scripts via :
run_script- — see Available Scripts above for why this is preferred over
run_script("scripts/check_conda.sh").conda --version - — replace
run_script("scripts/check_ngc_image.sh", "<cuda-tag-suffix>")with the tag determined from Step 2 (e.g.<cuda-tag-suffix>,cuda13,cuda12-dgpu).cuda12-igpu
If Holoscan is already installed, note the version and ask whether to upgrade or verify the existing install.
CUDA variant rule (canonical reference — apply this in all steps below):
| nvidia-smi CUDA Version | Native packages | Container tag |
|---|---|---|
| 13.x+ | | |
| 12.x, Blackwell GPU | | |
| 12.x, Ampere/Ada dGPU | | |
| ARM64 iGPU (Jetson, IGX) | | |
Native installs treat the driver CUDA version as a hard ceiling. Containers support Forward Compatibility (banner saying "CUDA Forward Compatibility mode ENABLED" is expected, not an error).
并行运行以下命令:
bash
docker --version 2>&1 | head -1; python3 --version 2>&1; pip3 --version 2>&1
dpkg -l | grep holoscan || true
pip3 show holoscan 2>/dev/null | grep -E "^(Name|Version)" || true
~/holoscan/venv/bin/pip show holoscan 2>/dev/null | grep -E "^(Name|Version)" | sed 's/^/venv: /' || true然后自行验证GPU直通功能——不要让用户运行此命令:
bash
docker run --rm --gpus all ubuntu:22.04 nvidia-smi 2>&1 | tail -5 || true根据结果填写第5步的状态列:
- 缺少→ 容器行状态为
docker。✗ — Docker未安装 - Docker已安装但提示→
could not select device driver "nvidia"。✗ — NVIDIA Container Toolkit缺失 - 显示输出 →
nvidia-smi。✓
然后通过调用检测脚本:
run_script- — 如上述可用脚本部分所述,此方法比
run_script("scripts/check_conda.sh")更可靠。conda --version - — 将
run_script("scripts/check_ngc_image.sh", "<cuda-tag-suffix>")替换为步骤2中确定的标签(例如<cuda-tag-suffix>、cuda13、cuda12-dgpu)。cuda12-igpu
如果Holoscan已安装,记录版本并询问用户是否要升级或验证现有安装。
CUDA变体规则(标准参考——所有步骤均需遵循):
| nvidia-smi显示的CUDA版本 | 原生包 | 容器标签 |
|---|---|---|
| 13.x+ | | |
| 12.x,Blackwell GPU | | |
| 12.x,Ampere/Ada dGPU | | |
| ARM64 iGPU(Jetson、IGX) | | |
原生安装将驱动的CUDA版本视为硬性上限。容器支持向前兼容(出现"CUDA Forward Compatibility mode ENABLED"提示为正常现象,并非错误)。
Step 5: Present Options and Recommend
步骤5:展示选项并给出推荐
Always present all methods in the table — never omit a row. Use the Status column to indicate availability on the host (unavailable methods show ✗ with a short reason). Use this table format:
| Method | Best for | Status |
|---|---|---|
| NGC Container | All deps bundled (CUDA, TensorRT, LibTorch, ONNX Runtime, Vulkan); C++ + Python. Needs Docker + NVIDIA Container Toolkit. | ✓/✗ based on docker presence |
| Debian/apt | Native Ubuntu; C++ only | ✓/✗ if package is installed |
| pip wheel | Python-only projects; needs CUDA Toolkit on PATH; Python 3.10–3.13. | ✓/✗ if wheel is installed in virtual env at ~/holoscan/venv |
| Conda | CUDA 13 only; good if already in a conda environment. | ✓/✗ based on |
| Source | Modifying SDK internals, custom CMake flags, debug symbols, unsupported platform, or unreleased branch. | ✓/✗ if already cloned at ~/holoscan/holoscan-sdk |
After the table, end the turn with this exact two-line shape:
Recommendation:—<method><one-line why>Which method would you like to use? (container / apt / wheel / conda / source)
If the user is new to Holoscan and the host is a supported x86_64 platform with Docker available, recommend NGC Container. For RHEL 9 or other container-only hosts, recommend container. For Python-only projects on a Docker-less host, recommend pip wheel.
Do not include , , , or commands in this turn — those live in the install skill invoked in Step 6. Keep this response short to avoid being truncated mid-table.
docker pulldocker runapt installpip install始终展示所有方法的表格——不要省略任何一行。使用状态列表示主机上的可用性(不可用方法显示✗及简短原因)。使用以下表格格式:
| 方法 | 适用场景 | 状态 |
|---|---|---|
| NGC容器 | 包含所有依赖项(CUDA、TensorRT、LibTorch、ONNX Runtime、Vulkan);支持C++ + Python。需要Docker + NVIDIA Container Toolkit。 | 根据Docker存在情况显示✓/✗ |
| Debian/apt | Ubuntu原生环境;仅支持C++ | 根据包是否已安装显示✓/✗ |
| pip wheel | 仅Python项目;需要PATH中存在CUDA Toolkit;支持Python 3.10–3.13。 | 根据~/holoscan/venv虚拟环境中是否已安装wheel显示✓/✗ |
| Conda | 仅支持CUDA 13;适合已使用conda环境的用户。 | 根据 |
| 源码构建 | 修改SDK内部代码、自定义CMake参数、调试符号、非支持平台或未发布分支。 | 根据~/holoscan/holoscan-sdk是否已克隆显示✓/✗ |
表格之后,以以下固定两行格式结束此步骤:
推荐:—<方法><单行理由>你想使用哪种方法?(container / apt / wheel / conda / source)
如果用户是Holoscan新手且主机为支持的x86_64平台并已安装Docker,推荐NGC容器。对于RHEL 9或仅支持容器的主机,推荐容器方法。对于无Docker的仅Python项目主机,推荐pip wheel。
此步骤不要包含、、或命令——这些命令属于第6步调用的安装技能。保持此回复简洁,避免表格被截断。
docker pulldocker runapt installpip installStep 6: Delegate to the Install Skill
步骤6:调用专属安装技能
Once a method is picked, invoke the corresponding skill — do not repeat the install steps inline:
| Method | Skill to invoke |
|---|---|
| NGC Container | |
| Debian/apt | |
| pip wheel | |
| Conda | |
| Source | |
Pass the CUDA variant (cu12/cu13/igpu) and any other relevant facts from Steps 2–4 as context when invoking the skill.
The install skill owns the full command set — including the recommended container flags (, , , , inner ) and verification examples. Do not restate them from ; delegate and let the install skill produce them.
--gpus all--ipc=host--ulimit memlock=-1--ulimit stack=67108864ulimit -s 32768holoscan-setup用户选定方法后,调用对应技能——不要重复安装步骤:
| 方法 | 调用的技能 |
|---|---|
| NGC容器 | |
| Debian/apt | |
| pip wheel | |
| Conda | |
| 源码构建 | |
调用技能时,传递步骤2-4中获取的CUDA变体(cu12/cu13/igpu)及其他相关信息作为上下文。
安装技能负责完整的命令集——包括推荐的容器参数(、、、、内部)及验证示例。不要在中重复这些内容;直接调用安装技能即可。
--gpus all--ipc=host--ulimit memlock=-1--ulimit stack=67108864ulimit -s 32768holoscan-setupStep 7: Summary
步骤7:总结
If installation was successful and tests were run, print a table summary of test results.
如果安装成功并完成测试,打印测试结果的表格总结。
Limitations
限制说明
- RHEL 9.x supports the NGC container method only — native packages are not published.
- Conda packages are CUDA 13 only; CUDA 12 hosts must use container, apt, pip wheel, or source.
- Debian/apt installs C++ only since Holoscan v3.0.0; Python support requires an additional pip wheel install.
- pip wheel requires glibc ≥ 2.35 and Python 3.10–3.13.
- Native installs cannot exceed the driver's reported CUDA Version; only containers can use CUDA Forward Compatibility.
- DGX Spark / Grace-Hopper OS requirements change between releases — always re-check .
sdk_installation.html
- RHEL 9.x仅支持NGC容器方法——未发布原生包。
- Conda包仅支持CUDA 13;CUDA 12主机需使用容器、apt、pip wheel或源码构建方法。
- 从Holoscan v3.0.0开始,Debian/apt仅安装C++版本;Python支持需额外安装pip wheel。
- pip wheel要求glibc ≥ 2.35且Python版本为3.10–3.13。
- 原生安装不能超过驱动报告的CUDA版本;仅容器可使用CUDA向前兼容功能。
- DGX Spark / Grace-Hopper的操作系统要求随版本变化——请始终重新查阅。
sdk_installation.html
Troubleshooting
故障排除
- says "command not found" but Conda is installed — common in zsh setups with lazy-loaded conda or when only
conda --versionran.bashrc. Useconda init; it searches install dirs and rc files.run_script("scripts/check_conda.sh") - shows a lower CUDA Version than expected — that field is the driver's max supported CUDA, not the installed toolkit. Upgrade the driver before installing a newer-CUDA package.
nvidia-smi - Debian install succeeds but fails in Python — apt installs C++ only since v3.0.0. Follow up with
import holoscan./holoscan-install-wheel - fails with glibc errors — host glibc is < 2.35. Use container or apt instead.
pip install holoscan - reports image missing — confirm NGC login (
check_ngc_image.sh) and that the tag suffix matches the CUDA variant rule in Step 4.docker login nvcr.io
- 提示"command not found"但已安装Conda — 在zsh环境中常见,可能是Conda延迟加载或仅
conda --version执行了.bashrc。使用conda init;该脚本会搜索安装目录和配置文件。run_script("scripts/check_conda.sh") - 显示的CUDA版本低于预期 — 该字段是驱动支持的最高CUDA版本,而非已安装的工具包版本。安装更高版本的CUDA包前请升级驱动。
nvidia-smi - Debian安装成功但Python中失败 — 从v3.0.0开始,apt仅安装C++版本。请后续调用
import holoscan。/holoscan-install-wheel - 因glibc错误失败 — 主机glibc < 2.35。请改用容器或apt方法。
pip install holoscan - 报告镜像缺失 — 确认已登录NGC(
check_ngc_image.sh)且标签后缀符合步骤4中的CUDA变体规则。docker login nvcr.io