Loading...
Loading...
Install Holoscan SDK via the NGC Docker container. Use for container-based installs; not for native apt/pip/Conda installs.
npx skill4agent add nvidia/skills holoscan-install-containernvcr.io/nvidia/clara-holoscan/holoscannvidia-smidockersudodocker run --gpus allnvcr.iodocs.nvidia.comnvcr.io/nvidia/clara-holoscan/holoscan<version>-<suffix>v4.1.0-cuda13nvidia-smi | Suffix |
|---|---|
| 13.x+ | |
| 12.x, Ampere/Ada dGPU | |
| 12.x, ARM64 iGPU (nvgpu) | |
docker run --rm --gpus all ubuntu:22.04 nvidia-smi 2>&1 | tail -5docker pull nvcr.io/nvidia/clara-holoscan/holoscan:<TAG>headless: trueIMG=nvcr.io/nvidia/clara-holoscan/holoscan:<TAG>
RUN=(docker run --rm --runtime=nvidia --gpus all --cap-add CAP_SYS_PTRACE --ipc=host --ulimit memlock=-1 --ulimit stack=67108864)
# 1a. hello_world (Python) — expect "Hello World!"
"${RUN[@]}" "$IMG" bash -c \
"ulimit -s 32768 && python3 /opt/nvidia/holoscan/examples/hello_world/python/hello_world.py"
# 1b. hello_world (C++) — expect "Hello World!"
"${RUN[@]}" "$IMG" bash -c \
"ulimit -s 32768 && /opt/nvidia/holoscan/examples/hello_world/cpp/hello_world"
# 2a. tensor_interop (C++) — expect tensors doubling each pass, "Graph execution finished."
"${RUN[@]}" "$IMG" bash -c \
"ulimit -s 32768 && /opt/nvidia/holoscan/examples/tensor_interop/cpp/tensor_interop"
# 2b. tensor_interop (Python, 10 frames) — Holoviz, headless. The YAML has no
# headless field by default, so inject one under `holoviz:`. Expect
# "message received (count: 10)".
"${RUN[@]}" "$IMG" bash -c "
ulimit -s 32768
sed -e 's/count: 0/count: 10/' \
-e 's/repeat: true/repeat: false/' \
-e 's/realtime: true/realtime: false/' \
-e 's/^holoviz:/holoviz:\n headless: true/' \
/opt/nvidia/holoscan/examples/tensor_interop/python/tensor_interop.yaml > /tmp/ti.yaml
cd /opt/nvidia/holoscan/examples/tensor_interop/python
python3 tensor_interop.py --config /tmp/ti.yaml
"
# 3a. video_replayer (Python, 10 frames) — Holoviz, headless. Inject `headless: true`
# under `holoviz:` (above `width: 854`). Same sed works for the C++ YAML in 3b —
# both files share the same `holoviz:` section shape.
"${RUN[@]}" "$IMG" bash -c "
ulimit -s 32768
sed -e 's/count: 0/count: 10/' \
-e 's/repeat: true/repeat: false/' \
-e 's/realtime: true/realtime: false/' \
-e 's/^ width: 854/ headless: true\n width: 854/' \
/opt/nvidia/holoscan/examples/video_replayer/python/video_replayer.yaml > /tmp/vr.yaml
cd /opt/nvidia/holoscan/examples/video_replayer/python
HOLOSCAN_INPUT_PATH=/opt/nvidia/holoscan/data python3 video_replayer.py --config /tmp/vr.yaml
"
# 3b. video_replayer (C++, 10 frames) — same headless injection as 3a. The C++
# YAML hard-codes `directory: "../data/racerx"`, but HOLOSCAN_INPUT_PATH
# overrides it, so we don't need to patch that field.
"${RUN[@]}" "$IMG" bash -c "
ulimit -s 32768
sed -e 's/count: 0/count: 10/' \
-e 's/repeat: true/repeat: false/' \
-e 's/realtime: true/realtime: false/' \
-e 's/^ width: 854/ headless: true\n width: 854/' \
/opt/nvidia/holoscan/examples/video_replayer/cpp/video_replayer.yaml > /tmp/vr_cpp.yaml
cd /opt/nvidia/holoscan/examples/video_replayer/cpp
HOLOSCAN_INPUT_PATH=/opt/nvidia/holoscan/data ./video_replayer --config /tmp/vr_cpp.yaml
"docker run -it --rm \
--runtime=nvidia --gpus all --cap-add CAP_SYS_PTRACE \
--ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/clara-holoscan/holoscan:<TAG>
# Examples: /opt/nvidia/holoscan/examples/
# Mount files: -v /host/path:/container/path
# GUI examples: add -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAYls /opt/nvidia/holoscan/examples//holoscan-explain-exampledocker: Error response from daemon: could not select device driver "nvidia"nvidia-smiulimit -s 32768bash -c "ulimit -s 32768 && ..."headless: truesedvideo_replayerHOLOSCAN_INPUT_PATH=/opt/nvidia/holoscan/data