From 2022e2b24bf08059f1dee38dbb637bf3f0300f16 Mon Sep 17 00:00:00 2001 From: GitLab CI Date: Mon, 20 Apr 2026 15:46:44 +0000 Subject: [PATCH 1/5] chore: Regenerate all playbooks --- nvidia/speculative-decoding/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nvidia/speculative-decoding/README.md b/nvidia/speculative-decoding/README.md index 96d61ec..46b8945 100644 --- a/nvidia/speculative-decoding/README.md +++ b/nvidia/speculative-decoding/README.md @@ -57,7 +57,7 @@ In short: two Sparks let you run models that are too large for one, while specul - Docker with GPU support enabled ```bash - docker run --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 nvidia-smi + docker run --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12 nvidia-smi ``` - Active HuggingFace Token for model access - Network connectivity for model downloads @@ -68,9 +68,9 @@ In short: two Sparks let you run models that are too large for one, while specul * **Duration:** 10-20 minutes for setup, additional time for model downloads (varies by network speed) * **Risks:** GPU memory exhaustion with large models, container registry access issues, network timeouts during downloads * **Rollback:** Stop Docker containers and optionally clean up downloaded model cache. -* **Last Updated:** 01/02/2026 - * Upgrade to latest container v1.2.0rc6 - * Add EAGLE-3 Speculative Decoding example with GPT-OSS-120B +* **Last Updated:** 04/20/2026 + * Upgrade to latest container 1.3.0rc12 + * Add Speculative Decoding example with Qwen3-235B-A22B on Two Sparks ## Instructions @@ -111,7 +111,7 @@ docker run \ -v $HOME/.cache/huggingface/:/root/.cache/huggingface/ \ --rm -it --ulimit memlock=-1 --ulimit stack=67108864 \ --gpus=all --ipc=host --network host \ - nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 \ + nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12 \ bash -c ' hf download openai/gpt-oss-120b && \ hf download nvidia/gpt-oss-120b-Eagle3-long-context \ @@ -172,7 +172,7 @@ docker run \ -e HF_TOKEN=$HF_TOKEN \ -v $HOME/.cache/huggingface/:/root/.cache/huggingface/ \ --rm -it --ulimit memlock=-1 --ulimit stack=67108864 \ - --gpus=all --ipc=host --network host nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 \ + --gpus=all --ipc=host --network host nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12 \ bash -c " # # Download models hf download nvidia/Llama-3.3-70B-Instruct-FP4 && \ @@ -309,7 +309,7 @@ docker run -d --rm \ -e TRITON_PTXAS_PATH="/usr/local/cuda/bin/ptxas" \ -v ~/.cache/huggingface/:/root/.cache/huggingface/ \ -v ~/.ssh:/tmp/.ssh:ro \ - nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 \ + nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc12 \ bash -c "curl https://raw.githubusercontent.com/NVIDIA/dgx-spark-playbooks/refs/heads/main/nvidia/trt-llm/assets/trtllm-mn-entrypoint.sh | bash" ``` From 90fe8c7cae868dcd68c848ea28f37691e94812e7 Mon Sep 17 00:00:00 2001 From: GitLab CI Date: Mon, 27 Apr 2026 17:19:18 +0000 Subject: [PATCH 2/5] chore: Regenerate all playbooks --- README.md | 1 + nvidia/i4h-so-arm/README.md | 488 ++++++++++++++++++++++++++++++++++++ nvidia/llama-cpp/README.md | 54 ++-- nvidia/lm-studio/README.md | 11 +- nvidia/nemoclaw/README.md | 56 +++-- 5 files changed, 554 insertions(+), 56 deletions(-) create mode 100644 nvidia/i4h-so-arm/README.md diff --git a/README.md b/README.md index 5458d39..0f3fbbe 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Each playbook includes prerequisites, step-by-step instructions, troubleshooting - [CUDA-X Data Science](nvidia/cuda-x-data-science/) - [DGX Dashboard](nvidia/dgx-dashboard/) - [FLUX.1 Dreambooth LoRA Fine-tuning](nvidia/flux-finetuning/) +- [Develop and Deploy Healthcare Robots with Isaac For Healthcare](nvidia/i4h-so-arm/) - [Install and Use Isaac Sim and Isaac Lab](nvidia/isaac/) - [Optimized JAX](nvidia/jax/) - [Live VLM WebUI](nvidia/live-vlm-webui/) diff --git a/nvidia/i4h-so-arm/README.md b/nvidia/i4h-so-arm/README.md new file mode 100644 index 0000000..9267d34 --- /dev/null +++ b/nvidia/i4h-so-arm/README.md @@ -0,0 +1,488 @@ +# Develop and Deploy Healthcare Robots with Isaac For Healthcare + +> End-to-end development and deployment of healthcare robots on DGX Spark + +## Table of Contents + +- [Overview](#overview) +- [Part 1: Preparation](#part-1-preparation) + - [Set Up Conda Environment](#set-up-conda-environment) + - [Set Up Docker Environment](#set-up-docker-environment) + - [Set Up the Scene](#set-up-the-scene) + - [Calibrate the Robot](#calibrate-the-robot) + - [Test Teleoperation](#test-teleoperation) +- [Part 2: Synthetic Data Generation](#part-2-synthetic-data-generation) +- [Part 3: Real-World Data Collection](#part-3-real-world-data-collection) +- [Part 4: GR00T N1.5 Fine-Tuning](#part-4-gr00t-n15-fine-tuning) +- [Part 5: Deploying Trained Robotic Policy](#part-5-deploying-trained-robotic-policy) + +--- + +## Overview + +## Basic idea + +Robotics and physical AI are driving the next wave of AI breakthroughs. Developing physical AI requires [3 computers](https://blogs.nvidia.com/blog/three-computers-robotics/) — 1. A simulation computer to generate synthetic data and digital twins, bridging the data gap. 2. A training computer to build the necessary foundation and world models. 3. A runtime computer to handle real-time robotic inference and intelligent interactions. + +This tutorial demonstrates the development and deployment of an autonomous healthcare robot using [NVIDIA Isaac For Healthcare](https://developer.nvidia.com/blog/introducing-nvidia-isaac-for-healthcare-an-ai-powered-medical-robotics-development-platform/) on a single [DGX Spark](https://www.nvidia.com/en-us/products/workstations/dgx-spark/), consolidating the 3-computers developer workflow onto one hardware platform. The example focuses on the [SO-101 robot](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) acting as a scrub nurse—a specialized nursing professional working directly in the sterile field during surgical procedures—to perform a crucial pick-and-place task — autonomously picking up a pair of surgical scissors and placing them into a surgical tray. + +## What you'll accomplish + +You'll complete the full development lifecycle of an autonomous healthcare robot on DGX Spark, covering the following stages: + +- **Part 1 — Preparation.** Set up the hardware, software environments, and task environment. +- **Part 2 — Generating synthetic data with Isaac Sim.** Collect synthetic pick-and-place demonstrations using teleoperation in a simulated environment. +- **Part 3 — Collecting real-world data.** Collect real-world teleoperation data with the physical SO-101 robot. +- **Part 4 — Fine-tuning the GR00T N1.5 model.** Fine-tune a pretrained GR00T N1.5 model using the collected data. +- **Part 5 — Deploying trained robotic policy.** Deploy the fine-tuned model in both simulated and real-world environments. + +## What to know before starting + +- Experience with Linux command line +- Basic understanding of Docker containers +- Familiarity with Python and conda environments +- Basic knowledge of robotics concepts (teleoperation, calibration) +- Familiarity with machine learning concepts (helpful but not required) + +## Prerequisites + +**Hardware Requirements:** +- [NVIDIA DGX Spark](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) with FastOS version 1.91.+ (verify with `cat /etc/fastos-release`; upgrade if necessary following [steps here](https://docs.nvidia.com/dgx/dgx-spark/system-recovery.html#recovery-process-steps)) +- [SO-101 Robot](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) with both leader & follower arms and wrist camera module (ensure mounting/fixation tools are included or acquired separately) +- USB-C splitter (needed since 4 USB connections are required and DGX Spark has only 3 available USB-C ports; use a high-quality splitter to minimize latency) +- OpenCV compatible USB web camera (for the room camera) +- Surgical tray (dimensions 24cm x 16cm x 5cm) +- Surgical scissors (length 18cm) +- Scene setup accessories — table, table cloth, and a camera stand/holder for the room camera + +**Software Requirements:** +- NVIDIA DGX OS +- Miniconda: [installation guidelines](https://www.anaconda.com/docs/getting-started/miniconda/install#aws-graviton2%2Farm64) +- Docker (pre-installed on DGX OS) + +## Ancillary files + +All required assets can be found in the [NVIDIA Isaac-For-Healthcare-Workflows repository](https://github.com/isaac-for-healthcare/i4h-workflows). + +- `workflows/so_arm_starter/` - Source code for the robotic scrub nurse example workflow +- `tools/env_setup_so_arm_starter.sh` - Environment setup script for the conda environment +- `workflows/so_arm_starter/docker/dgx.Dockerfile` - Dockerfile for the Docker environment + +## Time & risk + +* **Estimated time:** Approximately 2 days (GR00T N1.5 fine-tuning at 30,000 steps takes around 24 hours on DGX Spark; data collection and other setup steps require several additional hours) +* **Risk level:** Medium + * Robot calibration must remain consistent throughout the tutorial; re-calibrating after data collection or training may require restarting the entire process + * Large downloads and Docker builds may take significant time + * Leader and follower arm power cords have different voltages—do not mix them up +* **Rollback:** Conda environment and Docker image can be removed to revert software changes. Collected datasets can be deleted from `~/.cache/huggingface/lerobot/`. + +## Part 1: Preparation + +## Step 1. Prepare Hardware and Accessories + +Required components: + +* [**NVIDIA DGX Spark**](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) — Verify that FastOS version is 1.91.+ with `cat /etc/fastos-release`; upgrade if necessary following [steps here](https://docs.nvidia.com/dgx/dgx-spark/system-recovery.html#recovery-process-steps). +* [**SO-101 Robot**](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) — Requires both leader & follower arms with wrist camera module. Ensure mounting/fixation tools are included or acquired separately. +* **USB-C Splitter** — Needed since 4 USB connections (2 USB-C for arms, 2 USB-A for cameras) are required and DGX Spark has only 3 available USB-C ports. Use a high-quality splitter to minimize latency. +* **OpenCV compatible USB web camera** — For the room camera. +* **Surgical Tray** — Dimensions 24cm x 16cm x 5cm. +* **Surgical Scissors** — Length 18cm. +* **Scene Setup Accessories** — Table, table cloth, and a camera stand/holder for the room camera. + +## Step 2. Set Up Software Environments + +Power on DGX Spark and open a terminal window. + +Create a folder named `workspace` under your home directory, and clone the NVIDIA Isaac-For-Healthcare-Workflows repository `i4h-workflows` from GitHub: + +```shell +mkdir ~/workspace +cd ~/workspace && git clone https://github.com/isaac-for-healthcare/i4h-workflows.git +``` + +The source code for several Isaac For Healthcare example workflows is in this repository, including the robotic scrub nurse example at `/workflows/so_arm_starter`. + +This tutorial requires two separate software environments on DGX Spark: + +1. A conda environment for most of the tasks. +2. A docker environment for all tasks that require Isaac-GR00T. + +A separate docker environment was needed primarily because of the complexity in installing certain Isaac-GR00T dependencies, like `flash_attn`, on the DGX Spark's native arm64 OS. + +### Set Up Conda Environment + +First, ensure Miniconda is installed on DGX Spark. If not, follow the [installation guidelines here](https://www.anaconda.com/docs/getting-started/miniconda/install#aws-graviton2%2Farm64). Then, create a new conda environment and install the necessary dependencies for this tutorial: + +```shell +conda create -n so_arm_starter python=3.11 -y +conda activate so_arm_starter +cd && bash tools/env_setup_so_arm_starter.sh +``` + +Installation takes about 20 minutes and, when complete, prints a success message to the terminal. + +```shell +========================================== +Environment setup script finished. +========================================== +``` + +After installation, **deactivate and reactivate the `so_arm_starter` environment** to apply configurations: + +```shell +conda deactivate +conda activate so_arm_starter +``` + +After reactivating the conda environment, set the following environment variable: + +```shell +export PYTHONPATH=/workflows/so_arm_starter/scripts +``` + +To avoid manually setting the environment variable each time you activate `so_arm_starter`, optionally add the command to `~/.bashrc`. Source the file immediately after adding it to activate it in the current session. + +### Set Up Docker Environment + +To set up the docker environment, build a docker image using the `dgx.Dockerfile` provided under `/workflows/so_arm_starter/docker`: + +```shell +cd /workflows/so_arm_starter/docker +docker build -t soarm-dgx -f dgx.Dockerfile . +``` + +The build takes about 20 minutes, creating a docker image named `soarm-dgx`. + +## Step 3. Set Up the Task Environment + +### Set Up the Scene + +To set up the scrub nurse pick-and-place scene: + +1. **Mount Arms:** Firmly mount the follower arm on the table and the leader arm nearby for comfortable teleoperation. +2. **Set Scene:** Place the table cloth, surgical tray, and scissors on the table. Use a non-reflective, dark table cloth to minimize reflections and maintain consistent background color. Fixate the table cloth to the table to prevent movement when the follower's gripper touches it. Ensure the tray and scissors are within easy reach of the follower arm's gripper. +3. **Mount Camera:** Mount the room camera above the table for a top-down view. While other positions (like a side-view) might offer better object localization, the top-down view minimizes environmental elements, focusing only on task-relevant objects for a more robust setup. + +To finally adjust the table and room camera stand for optimal wrist and room camera views, power on the robot and cameras. Connect the following to the DGX Spark: + +* Leader and follower arms (2x USB-C) +* Wrist camera (1x USB-A) +* Room camera (1x USB-A or USB-C) + +Due to limited DGX Spark USB-C ports, a USB-C splitter (and optional USB-A/C converters) is needed. Power the leader and follower arms, **taking care not to mix up the power cords as voltages differ.** Use a camera tool (e.g., Cheese on DGX Spark) to check live feeds and finalize positioning. + +### Calibrate the Robot + +First, identify the device IDs for the two robot arms and the two cameras. + +Open a new terminal on DGX Spark. Activate the `so_arm_starter` conda environment: + +```shell +conda activate so_arm_starter +``` + +Execute the following command and follow the on-screen instructions to identify the device IDs of the leader arm and the follower arm: + +```shell +python -m lerobot.find_port +``` + +On a Linux-based system, the device IDs are usually `/dev/ttyACM0` and `/dev/ttyACM1`. + +Execute the following command to identify the wrist and room camera indices: + +```shell +python -m lerobot.find_cameras +``` + +The console should list 2 cameras with their indices (e.g., `/dev/video0` and `/dev/video2`). This command also captures and saves the current camera frames as distinct PNG images in `outputs/captured_images/`, using camera indices in the filename for easy identification and verification of feeds. + +Set access permissions for the robot arms before calibration by running: + +```shell +sudo chmod 666 /dev/ttyACM0 +sudo chmod 666 /dev/ttyACM1 +``` + +Adjust device IDs as needed. **Execute these commands every time the robot disconnects from and reconnects to DGX Spark.** + +Run the following commands in the terminal to calibrate the leader arm and the follower arm: + +```shell +## Leader arm: +python -m lerobot.calibrate --teleop.type=so101_leader --teleop.port=/dev/ttyACM0 --teleop.id=so101_leader + +## Follower arm: +python -m lerobot.calibrate --robot.type=so101_follower --robot.port=/dev/ttyACM1 --robot.id=so101_follower +``` + +Adjust device IDs and customize `--teleop.id` and `--robot.id` to set different device names if needed. Then, follow on-screen instructions and refer to the [video here](https://huggingface.co/docs/lerobot/so101#calibration-video) for proper calibration. + +> [!WARNING] +> Maintain *one* single follower arm calibration for this tutorial. Re-calibrating after collecting data or training the GR00T model risks needing to restart everything, as subsequent steps rely on the initial calibration. + +### Test Teleoperation + +To complete the preparation, teleoperate the follower arm using the leader arm. + +Run the following command to teleoperate without camera feeds: + +```shell +python -m lerobot.teleoperate \ +--robot.type=so101_follower \ +--robot.port=/dev/ttyACM1 \ +--robot.id=so101_follower \ +--teleop.type=so101_leader \ +--teleop.port=/dev/ttyACM0 \ +--teleop.id=so101_leader +``` + +Adjust the `--robot.port`, `--teleop.port`, `--robot.id` and `--teleop.id` arguments if needed. + +Run the following command to teleoperate with camera feeds: + +```shell +python -m lerobot.teleoperate \ +--robot.type=so101_follower \ +--robot.port=/dev/ttyACM1 \ +--robot.id=so101_follower \ +--robot.cameras="{wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30}, room: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \ +--teleop.type=so101_leader \ +--teleop.port=/dev/ttyACM0 \ +--teleop.id=so101_leader \ +--display_data=true +``` + +Adjust device IDs, names and camera indices if needed. + +During teleoperation with camera feeds, the [Rerun viewer](https://rerun.io/) UI appears, showing real-time views from both cameras and the robot's motor action data. + +## Part 2: Synthetic Data Generation + +## Step 1. Launch Isaac Sim for Data Collection + +Ensure the leader arm is powered on and connected to DGX Spark. Open a new terminal on DGX Spark, activate the `so_arm_starter` conda environment and set the `PYTHONPATH`: + +```shell +conda activate so_arm_starter +export PYTHONPATH=/workflows/so_arm_starter/scripts +``` + +Then, run the following command in the terminal: + +```shell +python -m simulation.environments.teleoperation_record \ + --port=/dev/ttyACM0 \ + --enable_cameras \ + --record \ + --dataset_path=./data-collection-sim/dataset.hdf5 +``` + +If needed, adjust the leader arm device ID and modify the `--dataset_path` argument to save data elsewhere. + +The command launches [Isaac Sim](https://developer.nvidia.com/isaac/sim), loading a scene with a follower arm, table, surgical scissors, and a tray. The initial load may take about 2 minutes; if Isaac Sim seems unresponsive, do not force quit—wait for it to load fully. + +To change the simulated follower arm's color to match your physical robot, go to the `Stage` panel (right side of Isaac Sim) → `World` → `envs` → `env_0` → `robot` → `Looks` → `material_a_3d_printed`, then under the `Property` tab, adjust the `Albedo Color`. + +The first command run requires leader arm calibration, even if previously done, due to a different program-specific calibration file. Your existing calibration remains unchanged. + +## Step 2. Collect Synthetic Pick-and-Place Demonstrations + +To teleoperate the robot in Isaac Sim and collect synthetic pick-and-place demonstrations: + +* Press "B" to begin teleoperation; the robot moves to the initial position. +* Use the physical leader arm to control the virtual follower arm for the pick-and-place task. +* Press "N" to save a successful episode. +* Press "R" to restart without saving. +* Scissors position and angle are slightly randomized per new episode. +* Press Ctrl + C to quit. + +Use these shortcuts for Isaac Sim viewport navigation: + +* "F" key after clicking the robot to auto-focus. +* Middle mouse wheel to zoom. +* "ALT" + left mouse drag to change the view angle. +* Middle mouse wheel click + drag to move in the viewport. + +Collecting around 70 synthetic episodes is sufficient for this tutorial. + +## Step 3. Convert Data to LeRobot Format + +After collecting the synthetic data, convert them to the Hugging Face [LeRobot](https://github.com/huggingface/lerobot) dataset format for fine-tuning the Isaac GR00T model: + +```shell +python -m training.hdf5_to_lerobot \ +--repo_id=spark/scrub-nurse-sim \ +--hdf5_path=./data-collection-sim/dataset.hdf5 \ +--task_description="Grip the scissors and put them into the tray." +``` + +Modify `--repo_id` and `--task_description` as needed, but ensure a meaningful task description. The resulting dataset, containing motor actions, wrist camera, and room camera recordings, is stored under `/home/$USER/.cache/huggingface/lerobot/`. + +## Part 3: Real-World Data Collection + +## Step 1. Set Up for Real-World Data Collection + +Ensure the leader arm, follower arm, wrist camera, and room camera are connected to DGX Spark. On DGX Spark, open a new terminal, activate the `so_arm_starter` conda environment: + +```shell +conda activate so_arm_starter +``` + +## Step 2. Collect Real-World Data Episodes + +Run the following command to collect real-world data episodes as LeRobot dataset: + +```shell +python -m lerobot.record \ +--robot.type=so101_follower \ +--robot.port=/dev/ttyACM1 \ +--robot.cameras="{wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30}, room: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \ +--robot.id=so101_follower \ +--teleop.type=so101_leader \ +--teleop.port=/dev/ttyACM0 \ +--teleop.id=so101_leader \ +--display_data=true \ +--dataset.repo_id="spark/scrub-nurse-real" \ +--dataset.num_episodes=20 \ +--dataset.single_task="Grip the scissors and put them into the tray." \ +--dataset.push_to_hub=false +``` + +Modify robot device IDs, names and camera indices to match yours. Ensure `--dataset.single_task` matches the task description for synthetic data collection. You can change `--dataset.repo_id` to alter the LeRobot dataset name. The dataset will be saved under `/home/$USER/.cache/huggingface/lerobot/`. + +The command initiates the Rerun viewer and teleoperation for both arms. Follow these steps for pick-and-place demonstration recording: + +* The recording starts immediately upon command execution for the current episode; be prepared or you'll need to re-record. +* Each episode's recording has three sequential states: + 1. **Demonstration recording** (60s) — Record the task. + 2. **Scene Reset** (60s) — Perform randomization, robot/object resets. Rerun displays signals, but no recording occurs. + 3. **Data Saving** (approx. 5s) — Saves recording to a LeRobot dataset. Rerun temporarily freezes; no recording occurs. +* Right Arrow (→) — skips to the next state. Cannot skip State 3 (saving stage); pressing it then could corrupt the episode. +* Left Arrow (←) (during State 1) — cancels the current recording, giving 60 seconds to reset the scene before recording restarts. Use this if you mess up. +* **ESC** — stops recording and saves all currently recorded content. Use after a completed successful episode to avoid including unwanted "garbage" data. +* Collecting multiple small, separate LeRobot datasets might be easier, and they can be combined for GR00T training later. + +## Step 3. Prepare Datasets for Training + +After creating the datasets, copy the `modality.json` file generated during synthetic data creation (e.g., `/home/$USER/.cache/huggingface/lerobot/spark/scrub-nurse-sim/meta/modality.json`) to each dataset's `meta` folder. This file is essential for GR00T model training. + +Collecting 20 real-world episodes should be sufficient for this tutorial. + +## Part 4: GR00T N1.5 Fine-Tuning + +## Step 1. Launch Docker Container + +Run the following command on DGX Spark to start a docker container: + +```shell +docker run -it --gpus all --privileged --rm \ + --ipc=host \ + --network=host \ + --ulimit memlock=-1 \ + --ulimit stack=67108864 \ + --entrypoint=bash \ + -e "NVIDIA_VISIBLE_DEVICES=all" \ + -e "PYTHONPATH=/workflows/so_arm_starter/scripts"\ + -v /dev:/dev \ + -v /home/"$USER"/.cache/huggingface/lerobot:/root/.cache/huggingface/lerobot \ + -v $(pwd):/workspace \ + -w /workspace \ +soarm-dgx +``` + +We mount `/home/"$USER"/.cache/huggingface/lerobot` to the container so previous calibration files and datasets are accessible. + +## Step 2. Download Pretrained Model + +Download our pretrained GR00T N1.5 model [here](https://github.com/isaac-for-healthcare/i4h-workflows/blob/main/workflows/so_arm_starter/README.md#-running-workflows). The model was trained on 70 simulated and 5 real episodes. This model will likely require fine-tuning due to variations in your robot hardware, calibration, and task setup. + +## Step 3. Run GR00T N1.5 Fine-Tuning + +Run the following command to run GR00T N1.5 fine-tuning: + +```shell +PYTHONWARNINGS="ignore::UserWarning" python -m training.gr00t_n1_5.train \ +--dataset_path ... \ +--output_dir /workspace/training-output/ \ +--data_config so100_dualcam \ +--base-model-path \ +--max-steps 30000 \ +--save-steps 2000 +``` + +Change `--base-model-path` to the pretrained model path. Experiment with `--max-steps` and `--save-steps`; we found 30,000 steps typically sufficient for convergence. On DGX Spark, 30,000 steps should take around 24 hours. + +You can use Tensorboard to monitor the training progress. + +## Part 5: Deploying Trained Robotic Policy + +## Step 1. Convert Model to TensorRT Format + +To get the optimal inference performance, let's convert the fine-tuned GR00T N1.5 model to [TensorRT](https://developer.nvidia.com/tensorrt) format. + +Open a terminal window and create the same docker container as in Part 4. Then, run the following commands: + +```shell +python -m policy_runner.gr00tn1_5.trt.export_onnx --ckpt_path +bash /workflows/so_arm_starter/scripts/policy_runner/gr00tn1_5/trt/build_engine.sh +``` + +This generates a `gr00t_engine` folder that contains the converted TensorRT model. Avoid running heavy compute or graphics tasks on DGX Spark during conversion. + +## Step 2. Deploy in Isaac Sim + +To deploy the trained policy model in Isaac Sim, an [RTI DDS](https://www.rti.com/products/dds-standard) license file is required for communication of different modules. Get a professional or evaluation license from [here](https://www.rti.com/get-connext). + +Open a new terminal window and create the same docker container as in Part 4. First, set the `RTI_LICENSE_FILE` environment variable: + +```shell +export RTI_LICENSE_FILE= +``` + +Then, run the following command: + +```shell +python -m policy_runner.run_policy \ +--ckpt_path= \ +--task_description="Grip the scissors and put them into the tray." \ +--trt \ +--trt_engine_path= +``` + +This loads the GR00T model for inference in the background. + +Open another terminal window. Activate the `so_arm_starter` conda environment and set `PYTHONPATH` and `RTI_LICENSE_FILE`: + +```shell +conda activate so_arm_starter +export PYTHONPATH=/workflows/so_arm_starter/scripts +export RTI_LICENSE_FILE= +``` + +Then, run the following command in the terminal: + +```shell +python -m simulation.environments.sim_with_dds --enable_cameras +``` + +Isaac Sim will open up and load the pick-and-place scene, then the simulated robot will execute the task autonomously, driven by the GR00T N1.5 policy model. + +## Step 3. Deploy in Real World + +Ensure the follower arm, wrist camera, and room camera are connected to DGX Spark. + +Launch the same docker container as in Part 4. Find and modify the configuration file under `/workflows/so_arm_starter/scripts/holoscan_apps/soarm_robot_config.yaml` to update the follower arm's device ID, name, camera indices, and the fine-tuned GR00T model path. Then, run the following command: + +```shell +python -m holoscan_apps.gr00t_inference_app \ +--config /workflows/so_arm_starter/scripts/holoscan_apps/soarm_robot_config.yaml +``` + +This command launches an efficient GR00T N1.5 inference application using [NVIDIA Holoscan SDK](https://github.com/nvidia-holoscan/holoscan-sdk). The follower arm will execute the task autonomously shortly after. + +## Conclusion + +This tutorial demonstrated the end-to-end workflow of developing and deploying an autonomous healthcare robot on a single **NVIDIA DGX Spark**. Leveraging **NVIDIA Isaac For Healthcare**, we consolidated the 3-computers workflow of synthetic data generation, GR00T N1.5 training, and robotic policy deployment onto one powerful hardware platform. This workflow highlights the efficiency of the DGX Spark for accelerating the physical AI development pipeline, making the creation and deployment of intelligent healthcare robots more streamlined and accessible. diff --git a/nvidia/llama-cpp/README.md b/nvidia/llama-cpp/README.md index a801717..782258b 100644 --- a/nvidia/llama-cpp/README.md +++ b/nvidia/llama-cpp/README.md @@ -1,6 +1,6 @@ # Run models with llama.cpp on DGX Spark -> Build llama.cpp with CUDA and serve models via an OpenAI-compatible API (Gemma 4 31B IT as example) +> Build llama.cpp with CUDA and serve models via an OpenAI-compatible API (Qwen3.6 as example) ## Table of Contents @@ -17,15 +17,15 @@ [llama.cpp](https://github.com/ggml-org/llama.cpp) is a lightweight C/C++ inference stack for large language models. You build it with CUDA so tensor work runs on the DGX Spark GB10 GPU, then load GGUF weights and expose chat through `llama-server`’s OpenAI-compatible HTTP API. -This playbook walks through that stack end to end. As the model example, it uses **Gemma 4 31B IT** - a frontier reasoning model built by Google DeepMind that llama.cpp supports, with strengths in coding, agentic workflows, and fine-tuning. The instructions download its **F16** GGUF from Hugging Face. The same build and server steps apply to other GGUFs (including other sizes in the support matrix below). +This playbook walks through that stack end to end using **Qwen3.6** as the hands-on example: a current-generation family that runs well from quantized GGUF on Spark. Checkpoint choices and paths for all supported models are summarized in the matrix below; commands are in the instructions. ## What you'll accomplish -You will build llama.cpp with CUDA for GB10, download a Gemma 4 31B IT model checkpoint, and run **`llama-server`** with GPU offload. You get: +You will build llama.cpp with CUDA for GB10, download a **Qwen3.6** example checkpoint, and run **`llama-server`** with GPU offload. You get: - Local inference through llama.cpp (no separate Python inference framework required) - An OpenAI-compatible `/v1/chat/completions` endpoint for tools and apps -- A concrete validation that **Gemma 4 31B IT** runs on this stack on DGX Spark +- A concrete validation that the **Qwen3.6** example runs on this stack on DGX Spark ## What to know before starting @@ -39,8 +39,8 @@ You will build llama.cpp with CUDA for GB10, download a Gemma 4 31B IT model che **Hardware requirements** - NVIDIA DGX Spark with GB10 GPU -- Sufficient unified memory for the F16 checkpoint (on the order of **~62GB** for weights alone; more when KV cache and runtime overhead are included) -- At least **~70GB** free disk for the F16 download plus build artifacts (use a smaller quant from the same repo if you need less disk and VRAM) +- Sufficient unified memory for the example **UD-Q4_K_M** MoE checkpoint (weights on the order of **~20GB**, plus KV cache and runtime overhead—scale up if you pick a larger quant or longer context) +- At least **~30GB** free disk for the example download plus build artifacts (more if you keep multiple GGUFs) **Software requirements** @@ -50,12 +50,14 @@ You will build llama.cpp with CUDA for GB10, download a Gemma 4 31B IT model che - CUDA Toolkit: `nvcc --version` - Network access to GitHub and Hugging Face -## Model Support Matrix +## Model support matrix -The following models are supported with llama.cpp on Spark. All listed models are available and ready to use: +The following models are supported with llama.cpp on Spark. The instructions use the **Qwen3.6** example row by default. | Model | Support Status | HF Handle | |-------|----------------|-----------| +| **Qwen3.6-35B-A3B** (example walkthrough) | ✅ | `unsloth/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf` | +| **Qwen3.6-27B** | ✅ | `unsloth/Qwen3.6-27B-GGUF/Qwen3.6-27B-Q4_K_M.gguf` | | **Gemma 4 31B IT** | ✅ | `ggml-org/gemma-4-31B-it-GGUF` | | **Gemma 4 26B A4B IT** | ✅ | `ggml-org/gemma-4-26B-A4B-it-GGUF` | | **Gemma 4 E4B IT** | ✅ | `ggml-org/gemma-4-E4B-it-GGUF` | @@ -64,17 +66,17 @@ The following models are supported with llama.cpp on Spark. All listed models ar ## Time & risk -* **Estimated time:** About 30 minutes, plus downloading the ~62GB example +* **Estimated time:** About 30 minutes, plus downloading the example GGUF (~20GB order of magnitude for the default quant) * **Risk level:** Low — build is local to your clone; no system-wide installs required for the steps below * **Rollback:** Remove the `llama.cpp` clone and the model directory under `~/models/` to reclaim disk space -* **Last updated:** 04/02/2026 - * First Publication +* **Last updated:** 04/27/2026 + * We now walk you through Qwen3.6 first; other models remain in the list ## Instructions ## Step 1. Verify prerequisites -This walkthrough uses **Gemma 4 31B IT** (`gemma-4-31B-it-f16.gguf`) as the example checkpoint. You can substitute another GGUF from [`ggml-org/gemma-4-31B-it-GGUF`](https://huggingface.co/ggml-org/gemma-4-31B-it-GGUF) (for example `Q4_K_M` or `Q8_0`) by changing the `hf download` filename and `--model` path in later steps. +The **example** checkpoint is **`Qwen3.6-35B-A3B-UD-Q4_K_M.gguf`** from Hugging Face repo **`unsloth/Qwen3.6-35B-A3B-GGUF`** (full handle: `unsloth/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf`). The other supported file is **`Qwen3.6-27B-Q4_K_M.gguf`** from **`unsloth/Qwen3.6-27B-GGUF`**—use the same build and server steps, changing `hf download` and `--model` paths (see the [overview model matrix](overview.md)). Ensure the required tools are installed: @@ -121,25 +123,25 @@ make -j8 The build usually takes on the order of 5–10 minutes. When it finishes, binaries such as `llama-server` appear under `build/bin/`. -## Step 4. Download Gemma 4 31B IT GGUF (supported model example) +## Step 4. Download example Qwen3.6-35B-A3B GGUF -llama.cpp loads models in **GGUF** format. **gemma-4-31B-it** is available in GGUF from Hugging Face; this playbook uses a F16 variant that balances quality and memory on GB10-class hardware. +llama.cpp loads models in **GGUF** format. This playbook uses the **UD-Q4_K_M** quantized MoE checkpoint from Unsloth, which fits comfortably on DGX Spark GB10 unified memory while keeping strong quality. ```bash -hf download ggml-org/gemma-4-31B-it-GGUF \ - gemma-4-31B-it-f16.gguf \ - --local-dir ~/models/gemma-4-31B-it-GGUF +hf download unsloth/Qwen3.6-35B-A3B-GGUF \ + Qwen3.6-35B-A3B-UD-Q4_K_M.gguf \ + --local-dir ~/models/Qwen3.6-35B-A3B-GGUF ``` -The F16 file is large (**~62GB**). The download can be resumed if interrupted. +The file is on the order of **~20GB** (exact size may vary). The download can be resumed if interrupted. -## Step 5. Start llama-server with Gemma 4 31B IT +## Step 5. Start llama-server with Qwen3.6-35B-A3B From your `llama.cpp/build` directory, launch the OpenAI-compatible server with GPU offload: ```bash ./bin/llama-server \ - --model ~/models/gemma-4-31B-it-GGUF/gemma-4-31B-it-f16.gguf \ + --model ~/models/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf \ --host 0.0.0.0 \ --port 30000 \ --n-gpu-layers 99 \ @@ -162,7 +164,7 @@ llama_new_context_with_model: n_ctx = 8192 main: server is listening on 0.0.0.0:30000 ``` -**Keep this terminal open** while testing. Large GGUFs can take several minutes to load; until you see `server is listening`, nothing accepts connections on port 30000 (see Troubleshooting if `curl` reports connection refused). +**Keep this terminal open** while testing. Large GGUFs can take a minute or more to load; until you see `server is listening`, nothing accepts connections on port 30000 (see Troubleshooting if `curl` reports connection refused). ## Step 6. Test the API @@ -195,7 +197,7 @@ Example shape of the response (fields vary by llama.cpp version; `message` may i } ], "created": 1765916539, - "model": "gemma-4-31B-it-f16.gguf", + "model": "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf", "object": "chat.completion", "usage": { "completion_tokens": 100, @@ -209,15 +211,15 @@ Example shape of the response (fields vary by llama.cpp version; `message` may i } ``` -## Step 7. Longer completion (with example model) +## Step 7. Longer completion (with Qwen3.6) -Try a slightly longer prompt to confirm stable generation with **Gemma 4 31B IT**: +Try a slightly longer prompt to confirm stable generation with **Qwen3.6-35B-A3B**: ```bash curl -X POST http://127.0.0.1:30000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ - "model": "gemma4", + "model": "qwen3", "messages": [{"role": "user", "content": "Solve this step by step: If a train travels 120 miles in 2 hours, what is its average speed?"}], "max_tokens": 500 }' @@ -231,7 +233,7 @@ To remove this tutorial’s artifacts: ```bash rm -rf ~/llama.cpp -rm -rf ~/models/gemma-4-31B-it-GGUF +rm -rf ~/models/Qwen3.6-35B-A3B-GGUF ``` Deactivate the Python venv if you no longer need `hf`: diff --git a/nvidia/lm-studio/README.md b/nvidia/lm-studio/README.md index 433cbd9..da0b00b 100644 --- a/nvidia/lm-studio/README.md +++ b/nvidia/lm-studio/README.md @@ -54,6 +54,9 @@ You'll deploy LM Studio on an NVIDIA DGX Spark device to run gpt-oss 120B, and u - Laptop and DGX Spark must be on the same local network - Network access to download packages and models +## Model support matrix +To explore supported models in LM Studio, check out [LM Studio model catalog](https://lmstudio.ai/models) page. + ## LM Link (optional) [LM Link](https://lmstudio.ai/link) lets you **use your local models remotely**. You link machines (e.g. your DGX Spark and your laptop), then load models on the Spark and use them from the laptop as if they were local. @@ -80,8 +83,8 @@ All required assets can be found below. These sample scripts can be used in Step * **Rollback:** * Downloaded models can be removed manually from the models directory. * Uninstall LM Studio or llmster -* **Last Updated:** 03/12/2026 - * Add instructions for LM Link features +* **Last Updated:** 04/27/2026 + * Introduce Qwen3.6 35B as example ## Instructions @@ -153,7 +156,7 @@ LM Link is in **Preview** and is free for up to 2 users, 5 devices each. For det As an example, let's download and run gpt-oss 120B, one of the best open source models from OpenAI. This model is too large for many laptops due to memory limitations, which makes this a fantastic use case for the Spark. ```bash -lms get openai/gpt-oss-120b +lms get qwen/qwen3.6-35b-a3b ``` This download will take a while due to its large size. Verify that the model has been successfully downloaded by listing your models: @@ -167,7 +170,7 @@ lms ls Load the model on your Spark so that it is ready to respond to requests from your laptop. ```bash -lms load openai/gpt-oss-120b +lms load qwen/qwen3.6-35b-a3b ``` ## Step 6. Set up a simple program that uses LM Studio SDK on the laptop diff --git a/nvidia/nemoclaw/README.md b/nvidia/nemoclaw/README.md index 5631c7f..4dabb05 100644 --- a/nvidia/nemoclaw/README.md +++ b/nvidia/nemoclaw/README.md @@ -297,7 +297,7 @@ Expected: JSON listing `nemotron-3-super:120b`. Still inside the sandbox, send a test message: ```bash -openclaw agent --agent main --local -m "hello" --session-id test +openclaw agent --agent main -m "hello" --session-id test ``` The agent will respond using Nemotron 3 Super. First responses may take 30--90 seconds for a 120B parameter model running locally. @@ -326,7 +326,7 @@ exit http://127.0.0.1:18789/#token= ``` -**If accessing the Web UI from a remote machine**, you need to set up port forwarding. +**If accessing the Web UI from a remote machine**, you need to set up an SSH tunnel. The NemoClaw onboard wizard already created the port 18789 forward on the Spark, so you only need to tunnel from your remote machine. First, find your Spark's IP address. On the Spark, run: @@ -336,13 +336,7 @@ hostname -I | awk '{print $1}' This prints the primary IP address (e.g. `192.168.1.42`). You can also find it in **Settings > Wi-Fi** or **Settings > Network** on the Spark's desktop, or check your router's connected-devices list. -Start the port forward on the Spark host: - -```bash -openshell forward start 18789 my-assistant --background -``` - -Then from your remote machine, create an SSH tunnel to the Spark (replace `` with the IP address from above): +From your remote machine, create an SSH tunnel to the Spark (replace `` with the IP address from above): ```bash ssh -L 18789:127.0.0.1:18789 @ @@ -357,6 +351,13 @@ http://127.0.0.1:18789/#token= > [!IMPORTANT] > Use `127.0.0.1`, not `localhost` -- the gateway origin check requires an exact match. +> [!NOTE] +> If the Web UI fails to load and the port forward may be stale, reset it on the Spark host: +> ```bash +> openshell forward stop 18789 my-assistant || true +> openshell forward start 18789 my-assistant --background +> ``` + --- ## Phase 3: Telegram Bot @@ -372,15 +373,7 @@ Open Telegram, find [@BotFather](https://t.me/BotFather), send `/newbot`, and fo Make sure you are on the **host** (not inside the sandbox). If you are inside the sandbox, run `exit` first. -Set the required environment variables. Replace the placeholders with your actual values. `SANDBOX_NAME` must match the sandbox name you chose during the onboard wizard: - -```bash -export TELEGRAM_BOT_TOKEN= -export SANDBOX_NAME=my-assistant -export NVIDIA_API_KEY= -``` - -Add the Telegram network policy to the sandbox: +Add the Telegram network policy to the sandbox so it can reach the Telegram API: ```bash nemoclaw my-assistant policy-add @@ -388,31 +381,42 @@ nemoclaw my-assistant policy-add When prompted, select `telegram` and hit **Y** to confirm. -Start the Telegram bridge. +The Telegram bridge uses cloudflared to expose a public webhook URL. Install cloudflared on the Spark host (arm64): + +```bash +curl -L --output cloudflared.deb \ + https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb +sudo dpkg -i cloudflared.deb +``` + +Set the bot token and start auxiliary services: ```bash export TELEGRAM_BOT_TOKEN= nemoclaw start ``` -The Telegram bridge starts only when the `TELEGRAM_BOT_TOKEN` environment variable is set. Verify the services are running: +The Telegram bridge starts only when the `TELEGRAM_BOT_TOKEN` environment variable is set. Verify the services are running and note the public URL: ```bash nemoclaw status ``` +You should see `● cloudflared` with a `trycloudflare.com` public URL (e.g. `https://assembled-peer-persian-kitty.trycloudflare.com`). + Open Telegram, find your bot, and send it a message. The bot forwards it to the agent and replies. +> [!NOTE] +> If `nemoclaw start` prints `cloudflared not found — no public URL`, the cloudflared install above did not complete successfully. Re-run the install, then restart services: +> ```bash +> nemoclaw stop && nemoclaw start +> ``` + > [!NOTE] > The first response may take 30--90 seconds for a 120B parameter model running locally. > [!NOTE] -> If the bridge does not appear in `nemoclaw status`, make sure `TELEGRAM_BOT_TOKEN` is exported in the same shell session where you run `nemoclaw start`. You can also try stopping and restarting: -> ```bash -> nemoclaw stop -> export TELEGRAM_BOT_TOKEN= -> nemoclaw start -> ``` +> If the bridge does not appear in `nemoclaw status`, make sure `TELEGRAM_BOT_TOKEN` is exported in the same shell session where you run `nemoclaw start`. > [!NOTE] > For details on restricting which Telegram chats can interact with the agent, see the [NemoClaw Telegram bridge documentation](https://docs.nvidia.com/nemoclaw/latest/deployment/set-up-telegram-bridge.html). From 5a9d5d1f2ad9a226363d836493e598fea72a22f3 Mon Sep 17 00:00:00 2001 From: GitLab CI Date: Tue, 28 Apr 2026 15:49:55 +0000 Subject: [PATCH 3/5] chore: Regenerate all playbooks --- nvidia/llama-cpp/README.md | 55 ++++++++++++------------- nvidia/lm-studio/README.md | 36 ++++++++++------- nvidia/nemoclaw/README.md | 82 ++++++++++++++++++-------------------- nvidia/sglang/README.md | 30 +++++++++----- nvidia/trt-llm/README.md | 10 ++--- nvidia/vllm/README.md | 27 +++++++++---- 6 files changed, 132 insertions(+), 108 deletions(-) diff --git a/nvidia/llama-cpp/README.md b/nvidia/llama-cpp/README.md index 782258b..7f144b0 100644 --- a/nvidia/llama-cpp/README.md +++ b/nvidia/llama-cpp/README.md @@ -1,6 +1,6 @@ # Run models with llama.cpp on DGX Spark -> Build llama.cpp with CUDA and serve models via an OpenAI-compatible API (Qwen3.6 as example) +> Build llama.cpp with CUDA and serve models via an OpenAI-compatible API (Nemotron 3 Nano Omni as example) ## Table of Contents @@ -17,15 +17,15 @@ [llama.cpp](https://github.com/ggml-org/llama.cpp) is a lightweight C/C++ inference stack for large language models. You build it with CUDA so tensor work runs on the DGX Spark GB10 GPU, then load GGUF weights and expose chat through `llama-server`’s OpenAI-compatible HTTP API. -This playbook walks through that stack end to end using **Qwen3.6** as the hands-on example: a current-generation family that runs well from quantized GGUF on Spark. Checkpoint choices and paths for all supported models are summarized in the matrix below; commands are in the instructions. +This playbook walks through that stack end to end using **Nemotron 3 Nano Omni** as the hands-on example: an NVIDIA MoE family that runs well from quantized GGUF on Spark. Checkpoint choices and paths for all supported models are summarized in the matrix below; commands are in the instructions. ## What you'll accomplish -You will build llama.cpp with CUDA for GB10, download a **Qwen3.6** example checkpoint, and run **`llama-server`** with GPU offload. You get: +You will build llama.cpp with CUDA for GB10, download a **Nemotron 3 Nano Omni** example checkpoint, and run **`llama-server`** with GPU offload. You get: - Local inference through llama.cpp (no separate Python inference framework required) - An OpenAI-compatible `/v1/chat/completions` endpoint for tools and apps -- A concrete validation that the **Qwen3.6** example runs on this stack on DGX Spark +- A concrete validation that the **Nemotron 3 Nano Omni** example runs on this stack on DGX Spark ## What to know before starting @@ -39,8 +39,8 @@ You will build llama.cpp with CUDA for GB10, download a **Qwen3.6** example chec **Hardware requirements** - NVIDIA DGX Spark with GB10 GPU -- Sufficient unified memory for the example **UD-Q4_K_M** MoE checkpoint (weights on the order of **~20GB**, plus KV cache and runtime overhead—scale up if you pick a larger quant or longer context) -- At least **~30GB** free disk for the example download plus build artifacts (more if you keep multiple GGUFs) +- Sufficient unified memory for the example **Q8_0** checkpoint (weights on the order of **~35GB**, plus KV cache and runtime overhead—scale up if you pick a larger quant or longer context) +- At least **~40GB** free disk for the example download plus build artifacts (more if you keep multiple GGUFs) **Software requirements** @@ -52,12 +52,13 @@ You will build llama.cpp with CUDA for GB10, download a **Qwen3.6** example chec ## Model support matrix -The following models are supported with llama.cpp on Spark. The instructions use the **Qwen3.6** example row by default. +The following models are supported with llama.cpp on Spark. The instructions use the **Nemotron 3 Nano Omni** example row by default. | Model | Support Status | HF Handle | |-------|----------------|-----------| -| **Qwen3.6-35B-A3B** (example walkthrough) | ✅ | `unsloth/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf` | -| **Qwen3.6-27B** | ✅ | `unsloth/Qwen3.6-27B-GGUF/Qwen3.6-27B-Q4_K_M.gguf` | +| **Nemotron 3 Nano Omni** (example walkthrough) | ✅ | `ggml-org/NVIDIA-Nemotron-3-Nano-Omni` | +| **Qwen3.6-35B-A3B** | ✅ | `unsloth/Qwen3.6-35B-A3B-GGUF` | +| **Qwen3.6-27B** | ✅ | `unsloth/Qwen3.6-27B-GGUF` | | **Gemma 4 31B IT** | ✅ | `ggml-org/gemma-4-31B-it-GGUF` | | **Gemma 4 26B A4B IT** | ✅ | `ggml-org/gemma-4-26B-A4B-it-GGUF` | | **Gemma 4 E4B IT** | ✅ | `ggml-org/gemma-4-E4B-it-GGUF` | @@ -66,17 +67,17 @@ The following models are supported with llama.cpp on Spark. The instructions use ## Time & risk -* **Estimated time:** About 30 minutes, plus downloading the example GGUF (~20GB order of magnitude for the default quant) +* **Estimated time:** About 30 minutes, plus downloading the example GGUF (~35GB order of magnitude for the default quant) * **Risk level:** Low — build is local to your clone; no system-wide installs required for the steps below * **Rollback:** Remove the `llama.cpp` clone and the model directory under `~/models/` to reclaim disk space -* **Last updated:** 04/27/2026 - * We now walk you through Qwen3.6 first; other models remain in the list +* **Last updated:** 04/28/2026 + * Walkthrough now uses Nemotron Omni; other model rows stay available ## Instructions ## Step 1. Verify prerequisites -The **example** checkpoint is **`Qwen3.6-35B-A3B-UD-Q4_K_M.gguf`** from Hugging Face repo **`unsloth/Qwen3.6-35B-A3B-GGUF`** (full handle: `unsloth/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf`). The other supported file is **`Qwen3.6-27B-Q4_K_M.gguf`** from **`unsloth/Qwen3.6-27B-GGUF`**—use the same build and server steps, changing `hf download` and `--model` paths (see the [overview model matrix](overview.md)). +The **example** checkpoint is **`nemotron-3-nano-omni-ga_v1.0-Q8_0.gguf`** from Hugging Face repo **`ggml-org/NVIDIA-Nemotron-3-Nano-Omni`** (full handle: `ggml-org/NVIDIA-Nemotron-3-Nano-Omni/nemotron-3-nano-omni-ga_v1.0-Q8_0.gguf`). Other supported GGUFs—including Qwen3.6, Gemma, and alternate Nemotron Omni builds—use the same build and server steps; change `hf download` and `--model` paths (see the [overview model matrix](overview.md)). Ensure the required tools are installed: @@ -123,25 +124,25 @@ make -j8 The build usually takes on the order of 5–10 minutes. When it finishes, binaries such as `llama-server` appear under `build/bin/`. -## Step 4. Download example Qwen3.6-35B-A3B GGUF +## Step 4. Download example Nemotron 3 Nano Omni GGUF -llama.cpp loads models in **GGUF** format. This playbook uses the **UD-Q4_K_M** quantized MoE checkpoint from Unsloth, which fits comfortably on DGX Spark GB10 unified memory while keeping strong quality. +llama.cpp loads models in **GGUF** format. This playbook uses the **Q8_0** checkpoint from `ggml-org/NVIDIA-Nemotron-3-Nano-Omni`, which balances quality and memory on DGX Spark GB10 unified memory. ```bash -hf download unsloth/Qwen3.6-35B-A3B-GGUF \ - Qwen3.6-35B-A3B-UD-Q4_K_M.gguf \ - --local-dir ~/models/Qwen3.6-35B-A3B-GGUF +hf download ggml-org/NVIDIA-Nemotron-3-Nano-Omni \ + nemotron-3-nano-omni-ga_v1.0-Q8_0.gguf \ + --local-dir ~/models/NVIDIA-Nemotron-3-Nano-Omni ``` -The file is on the order of **~20GB** (exact size may vary). The download can be resumed if interrupted. +The file is on the order of **~35GB** (exact size may vary). The download can be resumed if interrupted. -## Step 5. Start llama-server with Qwen3.6-35B-A3B +## Step 5. Start llama-server with Nemotron 3 Nano Omni From your `llama.cpp/build` directory, launch the OpenAI-compatible server with GPU offload: ```bash ./bin/llama-server \ - --model ~/models/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf \ + --model ~/models/NVIDIA-Nemotron-3-Nano-Omni/nemotron-3-nano-omni-ga_v1.0-Q8_0.gguf \ --host 0.0.0.0 \ --port 30000 \ --n-gpu-layers 99 \ @@ -174,7 +175,7 @@ Use a **second terminal on the same machine** that runs `llama-server` (for exam curl -X POST http://127.0.0.1:30000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ - "model": "gemma4", + "model": "nemotron", "messages": [{"role": "user", "content": "New York is a great city because..."}], "max_tokens": 100 }' @@ -197,7 +198,7 @@ Example shape of the response (fields vary by llama.cpp version; `message` may i } ], "created": 1765916539, - "model": "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf", + "model": "nemotron-3-nano-omni-ga_v1.0-Q8_0.gguf", "object": "chat.completion", "usage": { "completion_tokens": 100, @@ -211,15 +212,15 @@ Example shape of the response (fields vary by llama.cpp version; `message` may i } ``` -## Step 7. Longer completion (with Qwen3.6) +## Step 7. Longer completion (with Nemotron 3 Nano Omni) -Try a slightly longer prompt to confirm stable generation with **Qwen3.6-35B-A3B**: +Try a slightly longer prompt to confirm stable generation with **Nemotron 3 Nano Omni**: ```bash curl -X POST http://127.0.0.1:30000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ - "model": "qwen3", + "model": "nemotron", "messages": [{"role": "user", "content": "Solve this step by step: If a train travels 120 miles in 2 hours, what is its average speed?"}], "max_tokens": 500 }' @@ -233,7 +234,7 @@ To remove this tutorial’s artifacts: ```bash rm -rf ~/llama.cpp -rm -rf ~/models/Qwen3.6-35B-A3B-GGUF +rm -rf ~/models/NVIDIA-Nemotron-3-Nano-Omni ``` Deactivate the Python venv if you no longer need `hf`: diff --git a/nvidia/lm-studio/README.md b/nvidia/lm-studio/README.md index da0b00b..79e3912 100644 --- a/nvidia/lm-studio/README.md +++ b/nvidia/lm-studio/README.md @@ -27,7 +27,7 @@ This playbook shows you how to deploy LM Studio on an NVIDIA DGX Spark device to ## What you'll accomplish -You'll deploy LM Studio on an NVIDIA DGX Spark device to run gpt-oss 120B, and use the model from your laptop. More specifically, you will: +You'll deploy LM Studio on an NVIDIA DGX Spark device to run **Nemotron 3 Nano Omni** (`nvidia/nemotron-3-nano-omni`), and use the model from your laptop. More specifically, you will: - Install **llmster**, a totally headless, terminal native LM Studio on the Spark - Run LLM inference locally on DGX Spark via API @@ -55,7 +55,13 @@ You'll deploy LM Studio on an NVIDIA DGX Spark device to run gpt-oss 120B, and u - Network access to download packages and models ## Model support matrix -To explore supported models in LM Studio, check out [LM Studio model catalog](https://lmstudio.ai/models) page. +To explore all supported models in LM Studio, check out [LM Studio model catalog](https://lmstudio.ai/models) page. + +| Model | Support Status | Model Path | +|-------|----------------|-----------| +| **Nemotron 3 Nano Omni** | ✅ | `nvidia/nemotron-3-nano-omni` | +| **Qwen3.6-35B-A3B** | ✅ | `qwen/qwen3.6-35b-a3b` | +| **GPT-OSS-120B** | ✅ | `openai/gpt-oss-120b` | ## LM Link (optional) @@ -69,7 +75,7 @@ If you use LM Link, you can skip binding the server to `0.0.0.0` and using the S ## Ancillary files -All required assets can be found below. These sample scripts can be used in Step 6 of Instructions. +All required assets can be found below. These sample scripts can be used in Step 7 of Instructions. - [run.js](https://github.com/lmstudio-ai/docs/blob/main/_assets/nvidia-spark-playbook/js/run.js) - JavaScript script for sending a test prompt to Spark - [run.py](https://github.com/lmstudio-ai/docs/blob/main/_assets/nvidia-spark-playbook/py/run.py) - Python script for sending a test prompt to Spark @@ -83,8 +89,8 @@ All required assets can be found below. These sample scripts can be used in Step * **Rollback:** * Downloaded models can be removed manually from the models directory. * Uninstall LM Studio or llmster -* **Last Updated:** 04/27/2026 - * Introduce Qwen3.6 35B as example +* **Last Updated:** 04/28/2026 + * Introduce Nemotron Omni as example ## Instructions @@ -141,22 +147,22 @@ where `` is your device's IP address. You can find your Spark’s IP a hostname -I ``` -## Step 3b. (Optional) Connect with LM Link +## Step 4. (Optional) Connect with LM Link **LM Link** lets you use your Spark’s models from your laptop (or other devices) as if they were local, over an end-to-end encrypted connection. You don’t need to be on the same local network or bind the server to `0.0.0.0`. 1. **Create a Link** — Go to [lmstudio.ai/link](https://lmstudio.ai/link) and follow **Create your Link** to set up your private LM Link network. 2. **Link both devices** — On your DGX Spark (llmster) and on your laptop, sign in and join the same Link. LM Link uses Tailscale mesh VPNs; devices communicate without opening ports to the internet. -3. **Use remote models** — On your laptop, open LM Studio (or use the local server). Remote models from your Spark appear in the model loader. Any tool that connects to `localhost:1234` — including the LM Studio SDK, Codex, Claude Code, OpenCode, and the scripts in Step 6 — can use those models without changing the endpoint. +3. **Use remote models** — On your laptop, open LM Studio (or use the local server). Remote models from your Spark appear in the model loader. Any tool that connects to `localhost:1234` — including the LM Studio SDK, Codex, Claude Code, OpenCode, and the scripts in Step 7 — can use those models without changing the endpoint. LM Link is in **Preview** and is free for up to 2 users, 5 devices each. For details and limits, see [LM Link](https://lmstudio.ai/link). -## Step 4. Download a model to your Spark +## Step 5. Download a model to your Spark -As an example, let's download and run gpt-oss 120B, one of the best open source models from OpenAI. This model is too large for many laptops due to memory limitations, which makes this a fantastic use case for the Spark. +As an example, download **NVIDIA Nemotron 3 Nano Omni** from the LM Studio catalog (`nvidia/nemotron-3-nano-omni`) so you can run it on Spark with plenty of unified memory. ```bash -lms get qwen/qwen3.6-35b-a3b +lms get nvidia/nemotron-3-nano-omni ``` This download will take a while due to its large size. Verify that the model has been successfully downloaded by listing your models: @@ -165,15 +171,15 @@ This download will take a while due to its large size. Verify that the model has lms ls ``` -## Step 5. Load the model +## Step 6. Load the model Load the model on your Spark so that it is ready to respond to requests from your laptop. ```bash -lms load qwen/qwen3.6-35b-a3b +lms load nvidia/nemotron-3-nano-omni ``` -## Step 6. Set up a simple program that uses LM Studio SDK on the laptop +## Step 7. Set up a simple program that uses LM Studio SDK on the laptop Install the LM Studio SDKs and use a simple script to send a prompt to your Spark and validate the response. To get started quickly, we provide simple scripts below for Python, JavaScript, and Bash. Download the scripts from the Overview page of this playbook and run the corresponding command from the directory containing it. @@ -205,12 +211,12 @@ Pre-reqs: User has installed `jq` and `curl` bash run.sh ``` -## Step 7. Next Steps +## Step 8. Next Steps - Try downloading and serving different models from the [LM Studio model catalog](https://lmstudio.ai/models). - Use [LM Link](https://lmstudio.ai/link) to connect more devices and use your Spark’s models from anywhere with end-to-end encryption. -## Step 8. Cleanup and rollback +## Step 9. Cleanup and rollback Remove and uninstall LM Studio completely if needed. Note that LM Studio stores models separately from the application. Uninstalling LM Studio will not remove downloaded models unless you explicitly delete them. If you want to remove the entire LM Studio application, quit LM Studio from the tray first, then move the application to trash. diff --git a/nvidia/nemoclaw/README.md b/nvidia/nemoclaw/README.md index 4dabb05..1be6191 100644 --- a/nvidia/nemoclaw/README.md +++ b/nvidia/nemoclaw/README.md @@ -26,7 +26,7 @@ - [Step 7. Interactive TUI](#step-7-interactive-tui) - [Step 8. Exit the sandbox and access the Web UI](#step-8-exit-the-sandbox-and-access-the-web-ui) - [Step 9. Create a Telegram bot](#step-9-create-a-telegram-bot) - - [Step 10. Configure and start the Telegram bridge](#step-10-configure-and-start-the-telegram-bridge) + - [Step 10. Install cloudflared and start the Telegram bridge](#step-10-install-cloudflared-and-start-the-telegram-bridge) - [Step 11. Stop services](#step-11-stop-services) - [Step 12. Uninstall NemoClaw](#step-12-uninstall-nemoclaw) - [Troubleshooting](#troubleshooting) @@ -97,8 +97,7 @@ By participating in this demo, you acknowledge that you are solely responsible f **Hardware and access:** - A DGX Spark (GB10) with keyboard and monitor, or SSH access -- An **NVIDIA API key** from [build.nvidia.com](https://build.nvidia.com/settings/api-keys) (needed for the Telegram bridge) -- A **Telegram bot token** from [@BotFather](https://t.me/BotFather) (create one with `/newbot`) +- A **Telegram bot token** from [@BotFather](https://t.me/BotFather) (create one with `/newbot`) -- only needed if you want the Telegram bot. Have it ready *before* running the installer; the onboard wizard prompts for it. **Software:** @@ -118,8 +117,7 @@ Expected: Ubuntu 24.04, NVIDIA GB10 GPU, Docker 28.x+. | Item | Where to get it | |------|----------------| -| NVIDIA API key | [build.nvidia.com/settings/api-keys](https://build.nvidia.com/settings/api-keys) | -| Telegram bot token | [@BotFather](https://t.me/BotFather) on Telegram -- create with `/newbot` | +| Telegram bot token (optional) | [@BotFather](https://t.me/BotFather) on Telegram -- create with `/newbot`. Required only for the Telegram bot; have it ready before running the installer. | ### Ancillary files @@ -129,8 +127,8 @@ All required assets are handled by the NemoClaw installer. No manual cloning is - **Estimated time:** 20--30 minutes (with Ollama and model already downloaded). First-time model download adds ~15--30 minutes depending on network speed. - **Risk level:** Medium -- you are running an AI agent in a sandbox; risks are reduced by isolation but not eliminated. Use a clean environment and do not connect sensitive data or production accounts. -- **Last Updated:** 03/31/2026 - * First Publication +- **Last Updated:** 04/28/2026 + * Updated for NemoClaw v0.0.22+: revised Telegram setup, renamed tunnel commands, refreshed uninstall instructions. ## Instructions @@ -249,9 +247,13 @@ curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash The onboard wizard walks you through setup: 1. **Sandbox name** -- Pick a name (e.g. `my-assistant`). Names must be lowercase alphanumeric with hyphens only. -2. **Inference provider** -- Select **Local Ollama** (option 7). -3. **Model** -- Select **nemotron-3-super:120b** (option 1). -4. **Policy presets** -- Accept the suggested presets when prompted (hit **Y**). +2. **Inference provider** -- Select **Local Ollama**. +3. **Model** -- Select **nemotron-3-super:120b**. +4. **Messaging channels** -- If you want a Telegram bot, select `telegram` here and paste your bot token when prompted. Create the bot first via [@BotFather](https://t.me/BotFather) in Telegram (see Step 9). If you skip this, you can re-run the installer later to recreate the sandbox with Telegram enabled. +5. **Policy presets** -- Accept the suggested presets when prompted (hit **Y**). + +> [!IMPORTANT] +> Telegram must be configured at this step. The channel plugin and bot token are wired into the sandbox container during onboarding — they cannot be added to an existing sandbox by exporting environment variables on the host. When complete you will see output like: @@ -362,26 +364,22 @@ http://127.0.0.1:18789/#token= ## Phase 3: Telegram Bot -> [!NOTE] -> If you already configured Telegram during the NemoClaw onboarding wizard (step 5/8), you can skip this phase. These steps cover adding Telegram after the initial setup. +> [!IMPORTANT] +> Telegram must be enabled in the **NemoClaw onboard wizard** (Step 4 → Messaging channels). The channel plugin and bot token are wired into the sandbox container at sandbox creation time — `policy-add` only opens network egress and is not enough on its own. If you skipped Telegram during onboard, re-run the installer to recreate the sandbox with Telegram enabled. ### Step 9. Create a Telegram bot -Open Telegram, find [@BotFather](https://t.me/BotFather), send `/newbot`, and follow the prompts. Copy the bot token it gives you. +Do this **before** running the NemoClaw installer in Step 4 so you have your bot token ready when the wizard prompts for it. -### Step 10. Configure and start the Telegram bridge +Open Telegram, find [@BotFather](https://t.me/BotFather), send `/newbot`, and follow the prompts. Copy the bot token it gives you and paste it into the wizard when you reach the **Messaging channels** step. + +### Step 10. Install cloudflared and start the Telegram bridge + +The Telegram bridge needs a public webhook URL so Telegram can deliver messages to your bot. NemoClaw uses [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) to create a free `trycloudflare.com` tunnel. Make sure you are on the **host** (not inside the sandbox). If you are inside the sandbox, run `exit` first. -Add the Telegram network policy to the sandbox so it can reach the Telegram API: - -```bash -nemoclaw my-assistant policy-add -``` - -When prompted, select `telegram` and hit **Y** to confirm. - -The Telegram bridge uses cloudflared to expose a public webhook URL. Install cloudflared on the Spark host (arm64): +Install cloudflared (DGX Spark is arm64): ```bash curl -L --output cloudflared.deb \ @@ -389,14 +387,13 @@ curl -L --output cloudflared.deb \ sudo dpkg -i cloudflared.deb ``` -Set the bot token and start auxiliary services: +Start the tunnel: ```bash -export TELEGRAM_BOT_TOKEN= -nemoclaw start +nemoclaw tunnel start ``` -The Telegram bridge starts only when the `TELEGRAM_BOT_TOKEN` environment variable is set. Verify the services are running and note the public URL: +Verify the public URL is live: ```bash nemoclaw status @@ -407,16 +404,16 @@ You should see `● cloudflared` with a `trycloudflare.com` public URL (e.g. `ht Open Telegram, find your bot, and send it a message. The bot forwards it to the agent and replies. > [!NOTE] -> If `nemoclaw start` prints `cloudflared not found — no public URL`, the cloudflared install above did not complete successfully. Re-run the install, then restart services: +> If `nemoclaw tunnel start` prints `cloudflared not found — no public URL`, the cloudflared install above did not complete successfully. Re-run the install, then restart the tunnel: > ```bash -> nemoclaw stop && nemoclaw start +> nemoclaw tunnel stop && nemoclaw tunnel start > ``` > [!NOTE] > The first response may take 30--90 seconds for a 120B parameter model running locally. > [!NOTE] -> If the bridge does not appear in `nemoclaw status`, make sure `TELEGRAM_BOT_TOKEN` is exported in the same shell session where you run `nemoclaw start`. +> If sending a message returns `Error: Channel is unavailable: telegram`, the channel was not enabled during onboard. Re-run the installer to recreate the sandbox with Telegram selected at the **Messaging channels** step. > [!NOTE] > For details on restricting which Telegram chats can interact with the agent, see the [NemoClaw Telegram bridge documentation](https://docs.nvidia.com/nemoclaw/latest/deployment/set-up-telegram-bridge.html). @@ -427,10 +424,10 @@ Open Telegram, find your bot, and send it a message. The bot forwards it to the ### Step 11. Stop services -Stop any running auxiliary services (Telegram bridge, cloudflared tunnel): +Stop the cloudflared tunnel: ```bash -nemoclaw stop +nemoclaw tunnel stop ``` Stop the port forward: @@ -442,14 +439,13 @@ openshell forward stop 18789 # stop the dashboard forward ### Step 12. Uninstall NemoClaw -Run the uninstaller from the cloned source directory. It removes all sandboxes, the OpenShell gateway, Docker containers/images/volumes, the CLI, and all state files. Docker, Node.js, npm, and Ollama are preserved. +Run the uninstaller via curl (matches the [NemoClaw README](https://github.com/NVIDIA/NemoClaw)). It removes all sandboxes, the OpenShell gateway, Docker containers/images/volumes, the CLI, and all state files. Docker, Node.js, npm, and Ollama are preserved. ```bash -cd ~/.nemoclaw/source -./uninstall.sh +curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/refs/heads/main/uninstall.sh | bash ``` -**Uninstaller flags:** +**Uninstaller flags** (pass via `bash -s -- `): | Flag | Effect | |------|--------| @@ -457,10 +453,10 @@ cd ~/.nemoclaw/source | `--keep-openshell` | Leave the `openshell` binary in place | | `--delete-models` | Also remove the Ollama models pulled by NemoClaw | -To remove everything including the Ollama model: +To remove everything including the Ollama model, non-interactively: ```bash -./uninstall.sh --yes --delete-models +curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/refs/heads/main/uninstall.sh | bash -s -- --yes --delete-models ``` The uninstaller runs 6 steps: @@ -472,7 +468,7 @@ The uninstaller runs 6 steps: 6. Remove state directories (`~/.nemoclaw`, `~/.config/openshell`, `~/.config/nemoclaw`) and the OpenShell binary > [!NOTE] -> The source clone at `~/.nemoclaw/source` is removed as part of state cleanup in step 6. If you want to keep a local copy, move or back it up before running the uninstaller. +> If you have a local clone at `~/.nemoclaw/source` you want to keep, move or back it up before running the uninstaller — it is removed as part of state cleanup in step 6. ## Useful commands @@ -482,13 +478,13 @@ The uninstaller runs 6 steps: | `nemoclaw my-assistant status` | Show sandbox status and inference config | | `nemoclaw my-assistant logs --follow` | Stream sandbox logs in real time | | `nemoclaw list` | List all registered sandboxes | -| `nemoclaw start` | Start auxiliary services (Telegram bridge, cloudflared) | -| `nemoclaw stop` | Stop auxiliary services | +| `nemoclaw tunnel start` | Start cloudflared tunnel (public URL for Telegram webhooks) | +| `nemoclaw tunnel stop` | Stop the cloudflared tunnel | | `openshell term` | Open the monitoring TUI on the host | | `openshell forward list` | List active port forwards | | `openshell forward start 18789 my-assistant --background` | Restart port forwarding for Web UI | -| `cd ~/.nemoclaw/source && ./uninstall.sh` | Remove NemoClaw (preserves Docker, Node.js, Ollama) | -| `cd ~/.nemoclaw/source && ./uninstall.sh --delete-models` | Remove NemoClaw and Ollama models | +| `curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/refs/heads/main/uninstall.sh \| bash` | Remove NemoClaw (preserves Docker, Node.js, Ollama) | +| `curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/refs/heads/main/uninstall.sh \| bash -s -- --delete-models` | Remove NemoClaw and Ollama models | ## Troubleshooting diff --git a/nvidia/sglang/README.md b/nvidia/sglang/README.md index cef4d11..01dac69 100644 --- a/nvidia/sglang/README.md +++ b/nvidia/sglang/README.md @@ -53,6 +53,7 @@ The following models are supported with SGLang on Spark. All listed models are a | Model | Quantization | Support Status | HF Handle | |-------|-------------|----------------|-----------| +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | BF16 | ✅ | [`nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16`](https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16) | | **GPT-OSS-20B** | MXFP4 | ✅ | `openai/gpt-oss-20b` | | **GPT-OSS-120B** | MXFP4 | ✅ | `openai/gpt-oss-120b` | | **Llama-3.1-8B-Instruct** | FP8 | ✅ | `nvidia/Llama-3.1-8B-Instruct-FP8` | @@ -75,12 +76,19 @@ Note: for NVFP4 models, add the `--quantization modelopt_fp4` flag. * **Estimated time:** 30 minutes for initial setup and validation * **Risk level:** Low - Uses pre-built, validated SGLang container with minimal configuration * **Rollback:** Stop and remove containers with `docker stop` and `docker rm` commands -* **Last Updated:** 03/15/2026 - * Use latest NGC SGLang container: nvcr.io/nvidia/sglang:26.02-py3 +* **Last Updated:** 04/28/2026 + * Introduce Nemotron-3-Nano-Omni reasoning FP8 support ## Instructions -## Step 1. Verify system prerequisites +## Step 1. Use model specific deployment guide + +Certain models require special deployment configurations. Please refer to their respective model cards to run on DGX Spark: +| Model | Quantization | HF Model Card Link | +|-------|-------------|----------------| +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | BF16 | https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 | + +## Step 2. Verify system prerequisites Check that your NVIDIA Spark device meets all requirements before proceeding. This step runs on your host system and ensures Docker, GPU drivers, and container toolkit are properly configured. @@ -108,7 +116,7 @@ sudo usermod -aG docker $USER newgrp docker ``` -## Step 2. Pull the SGLang Container +## Step 3. Pull the SGLang Container Download the latest SGLang container. This step runs on the host and may take several minutes depending on your network connection. @@ -122,7 +130,7 @@ docker pull nvcr.io/nvidia/sglang:26.02-py3 docker images | grep sglang ``` -## Step 3. Launch SGLang container for server mode +## Step 4. Launch SGLang container for server mode Start the SGLang container in server mode to enable HTTP API access. This runs the inference server inside the container, exposing it on port 30000 for client connections. @@ -136,7 +144,7 @@ docker run --gpus all -it --rm \ bash ``` -## Step 4. Start the SGLang inference server +## Step 5. Start the SGLang inference server Inside the container, launch the HTTP inference server with a supported model. This step runs inside the Docker container and starts the SGLang server daemon. @@ -159,7 +167,7 @@ sleep 30 curl http://localhost:30000/health ``` -## Step 5. Test client-server inference +## Step 6. Test client-server inference From a new terminal on your host system, test the SGLang server API to ensure it's working correctly. This validates that the server is accepting requests and generating responses. @@ -177,7 +185,7 @@ curl -X POST http://localhost:30000/generate \ }' ``` -## Step 6. Test Python client API +## Step 7. Test Python client API Create a simple Python script to test programmatic access to the SGLang server. This runs on the host system and demonstrates how to integrate SGLang into applications. @@ -197,7 +205,7 @@ response = requests.post('http://localhost:30000/generate', json={ print(f"Response: {response.json()['text']}") ``` -## Step 7. Validate installation +## Step 8. Validate installation Confirm that both server and offline modes are working correctly. This step verifies the complete SGLang setup and ensures reliable operation. @@ -213,7 +221,7 @@ docker ps docker logs ``` -## Step 8. Cleanup and rollback +## Step 9. Cleanup and rollback Stop and remove containers to clean up resources. This step returns your system to its original state. @@ -232,7 +240,7 @@ docker container prune -f docker rmi nvcr.io/nvidia/sglang:26.02-py3 ``` -## Step 9. Next steps +## Step 10. Next steps With SGLang successfully deployed, you can now: diff --git a/nvidia/trt-llm/README.md b/nvidia/trt-llm/README.md index 3ff1769..5d19853 100644 --- a/nvidia/trt-llm/README.md +++ b/nvidia/trt-llm/README.md @@ -57,7 +57,7 @@ inference through kernel-level optimizations, efficient memory layouts, and adva - DGX Spark device - NVIDIA drivers compatible with CUDA 12.x: `nvidia-smi` -- Docker installed and GPU support configured: `docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 nvidia-smi` +- Docker installed and GPU support configured: `docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5 nvidia-smi` - Hugging Face account with token for model access: `echo $HF_TOKEN` - Sufficient GPU VRAM (40GB+ recommended for 70B models) - Internet connectivity for downloading models and container images @@ -136,7 +136,7 @@ models and containers. nvidia-smi ## Verify Docker GPU support -docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 nvidia-smi +docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5 nvidia-smi ``` @@ -146,7 +146,7 @@ docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6 nvidia-s ## Set `HF_TOKEN` for model access. export HF_TOKEN= -export DOCKER_IMAGE="nvcr.io/nvidia/tensorrt-llm/release:1.2.0rc6" +export DOCKER_IMAGE="nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5" ``` ## Step 4. Validate TensorRT-LLM installation @@ -161,8 +161,8 @@ docker run --rm -it --gpus all \ Expected output: ``` -[TensorRT-LLM] TensorRT-LLM version: 1.2.0rc6 -TensorRT-LLM version: 1.2.0rc6 +[TensorRT-LLM] TensorRT-LLM version: 1.3.0rc5 +TensorRT-LLM version: 1.3.0rc5 ``` ## Step 5. Create cache directory diff --git a/nvidia/vllm/README.md b/nvidia/vllm/README.md index 125940f..43a8511 100644 --- a/nvidia/vllm/README.md +++ b/nvidia/vllm/README.md @@ -54,6 +54,9 @@ The following models are supported with vLLM on Spark. All listed models are ava | Model | Quantization | Support Status | HF Handle | |-------|-------------|----------------|-----------| +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | BF16 | ✅ | [`nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16`](https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16) | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | FP8 | ✅ | [`nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-FP8`](https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-FP8) | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | NVFP4 | ✅ | [`nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4`](https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4) | | **Gemma 4 31B IT** | Base | ✅ | [`google/gemma-4-31B-it`](https://huggingface.co/google/gemma-4-31B-it) | | **Gemma 4 31B IT** | NVFP4 | ✅ | [`nvidia/Gemma-4-31B-IT-NVFP4`](https://huggingface.co/nvidia/Gemma-4-31B-IT-NVFP4) | | **Gemma 4 26B A4B IT** | Base | ✅ | [`google/gemma-4-26B-A4B-it`](https://huggingface.co/google/gemma-4-26B-A4B-it) | @@ -94,12 +97,22 @@ Reminder: not all model architectures are supported for NVFP4 quantization. * **Duration:** 30 minutes for Docker approach * **Risks:** Container registry access requires internal credentials * **Rollback:** Container approach is non-destructive. -* **Last Updated:** 04/02/2026 - * Add support for Gemma 4 model family +* **Last Updated:** 04/28/2026 + * Add support for Nemotron-3-Nano-Omni reasoning BF16, FP8, NVFP4 ## Instructions -## Step 1. Configure Docker permissions +## Step 1. Use model specific deployment guide + +Certain models require special deployment configurations. Please refer to their respective model cards to run on DGX Spark: + +| Model | Quantization | HF Model Card Link | +|-------|-------------|----------------| +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | BF16 | https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | FP8 | https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-FP8 | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | NVFP4 | https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4 | + +## Step 2. Configure Docker permissions To easily manage containers without sudo, you must be in the `docker` group. If you choose to skip this step, you will need to run Docker commands with sudo. @@ -115,7 +128,7 @@ sudo usermod -aG docker $USER newgrp docker ``` -## Step 2. Pull vLLM container image +## Step 3. Pull vLLM container image Find the latest container build from https://catalog.ngc.nvidia.com/orgs/nvidia/containers/vllm @@ -136,7 +149,7 @@ For Gemma 4 model family, use vLLM custom containers: docker pull vllm/vllm-openai:gemma4-cu130 ``` -## Step 3. Test vLLM in container +## Step 4. Test vLLM in container Launch the container and start vLLM server with a test model to verify basic functionality. @@ -171,7 +184,7 @@ curl http://localhost:8000/v1/chat/completions \ Expected response should contain `"content": "204"` or similar mathematical calculation. -## Step 4. Cleanup and rollback +## Step 5. Cleanup and rollback For container approach (non-destructive): @@ -180,7 +193,7 @@ docker rm $(docker ps -aq --filter ancestor=nvcr.io/nvidia/vllm:${LATEST_VLLM_VE docker rmi nvcr.io/nvidia/vllm ``` -## Step 5. Next steps +## Step 6. Next steps - **Production deployment:** Configure vLLM with your specific model requirements - **Performance tuning:** Adjust batch sizes and memory settings for your workload From 9809e38119c1937133ff2ff9b4bdfe906ef9e079 Mon Sep 17 00:00:00 2001 From: GitLab CI Date: Wed, 29 Apr 2026 18:29:39 +0000 Subject: [PATCH 4/5] chore: Regenerate all playbooks --- README.md | 1 + nvidia/hermes-agent/README.md | 262 ++++++++++++++++++++++++++++++++++ nvidia/trt-llm/README.md | 54 ++++++- 3 files changed, 310 insertions(+), 7 deletions(-) create mode 100644 nvidia/hermes-agent/README.md diff --git a/README.md b/README.md index 0f3fbbe..bf07497 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Each playbook includes prerequisites, step-by-step instructions, troubleshooting - [CUDA-X Data Science](nvidia/cuda-x-data-science/) - [DGX Dashboard](nvidia/dgx-dashboard/) - [FLUX.1 Dreambooth LoRA Fine-tuning](nvidia/flux-finetuning/) +- [Hermes-agent with Local Models](nvidia/hermes-agent/) - [Develop and Deploy Healthcare Robots with Isaac For Healthcare](nvidia/i4h-so-arm/) - [Install and Use Isaac Sim and Isaac Lab](nvidia/isaac/) - [Optimized JAX](nvidia/jax/) diff --git a/nvidia/hermes-agent/README.md b/nvidia/hermes-agent/README.md new file mode 100644 index 0000000..1adc24a --- /dev/null +++ b/nvidia/hermes-agent/README.md @@ -0,0 +1,262 @@ +# Hermes-agent with Local Models + +> Install and run the Hermes self-improving AI agent on DGX Spark. + +## Table of Contents + +- [Overview](#overview) +- [Instructions](#instructions) +- [Troubleshooting](#troubleshooting) + +--- + +## Overview + +## Basic idea + +[Hermes Agent](https://github.com/NousResearch/hermes-agent) is a **self-improving** AI agent built by [Nous Research](https://nousresearch.com). It runs as a terminal TUI on your machine and, through a built-in gateway, can also be reached from messaging platforms like Telegram, Discord, and Slack. It creates skills from experience, improves them during use, persists memory across sessions, and can run scheduled tasks via its built-in cron. + +Running Hermes and its LLM **fully on your DGX Spark** keeps your conversations and data private and avoids ongoing cloud API costs. DGX Spark is well suited for this: it runs Linux, is designed to stay on, and has **128GB memory**, so you can serve large local models for better reasoning quality and connect to the agent from your phone over Telegram while the heavy work runs locally. + +## What you'll accomplish + +You will have Hermes installed on your DGX Spark and connected to a local LLM served by Ollama. You can chat with the agent from the DGX Spark terminal and from Telegram on your phone or laptop. The gateway runs as a system service, so the agent stays reachable across reboots without anyone logging in. + +- Install Ollama and pull a local model +- Install Hermes and configure it against the local Ollama endpoint +- Set up a Telegram bot so you can message Hermes from any Telegram client +- Resume past sessions, switch models, update, and uninstall using the `hermes` CLI + +## Popular use cases + +- **Personal assistant from your phone**: Chat with Hermes via Telegram while the model runs on your Spark — manage email drafts, summarize docs, or answer questions on the go. +- **Multi-step task automation**: Ask the agent to walk you through configurations (e.g., setting up email); on non-trivial tasks Hermes can autonomously persist a reusable skill for next time. +- **Scheduled checks**: Use the built-in cron to watch a product price online or run a daily check, and have results delivered to your Telegram home channel. +- **Reasoning-visible problem solving**: Use `/reasoning show` in the TUI to follow the agent's intermediate reasoning on complex problems. + +## What to know before starting + +- Basic use of the Linux terminal and a text editor +- Familiarity with Ollama or willingness to follow the [Ollama playbook](../ollama/) first +- A Telegram account if you want to use the messaging gateway +- Awareness of the security considerations below + +## Important: security and risks + +AI agents that can execute commands and reach external services introduce real risks. Read the upstream guidance: [Hermes documentation](https://hermes-agent.nousresearch.com/docs/). + +Main risks: + +1. **Data exposure**: Personal information or files on your DGX Spark may be leaked through agent actions or messaging channels. +2. **Unauthorized access**: A Telegram bot left open to anyone who finds it can be misused; a model endpoint exposed beyond `localhost` can be abused. + +You cannot eliminate all risk; proceed at your own risk. **Recommended security measures:** + +- **Restrict the Telegram bot** by entering one or more numeric Telegram user IDs at the *"Allowed user IDs"* prompt during install. Leaving this blank allows anyone who finds the bot to use it. +- Keep the Ollama endpoint bound to **`localhost` only**; do not expose `http://:11434` to your LAN or the public internet without strong authentication. +- Run Hermes on a Spark dedicated to this purpose where possible, and only place files on it that the agent is allowed to access. +- **Monitor activity**: Periodically review the gateway service logs (`journalctl -u `) and the Hermes session history. + +## Prerequisites + +- DGX Spark running Linux, connected to your network +- Terminal (SSH or local) access to the Spark +- `curl` and `git` installed (verified in Step 1 of the instructions) +- Enough disk and GPU memory for the Ollama model you plan to serve (the playbook uses `qwen3.6:27b` as the example; pick a smaller model if you want a faster first install) +- A Telegram account and the ability to create a bot via [@BotFather](https://t.me/BotFather) if you plan to use the messaging gateway + +## Time and risk + +- **Duration**: About 30 minutes for install and first-time setup; model download time depends on size and network speed. +- **Risk level**: **Medium** — the agent can execute commands, persist skills, and is reachable from Telegram. Risk increases if you skip the allowed-user-IDs restriction or expose the local model endpoint beyond `localhost`. Always follow the security measures above. +- **Rollback**: Run `hermes uninstall` to remove Hermes, the gateway service, and the shell-profile entry. Uninstall Ollama separately if desired. +- **Last Updated**: 2026-04-26 + - First Publication + +## Instructions + +## Step 1. Verify your environment + +Before installing Hermes, confirm that your DGX Spark is running DGX OS, has network access, and exposes the basic command-line tools used during install. + +```bash +uname -a +curl --version +git --version +``` + +Expected output should show DGX OS and working `curl` / `git` binaries. + +## Step 2. Install Ollama and pull a model + +Hermes will be configured against a local Ollama endpoint, so Ollama must be installed and serving at least one model before you run the Hermes installer. If you have already completed the [Ollama playbook](../ollama/), you can skip this step. + +Install Ollama: + +```bash +curl -fsSL https://ollama.com/install.sh | sh +``` + +Verify the Ollama service is running and reachable on the default port: + +```bash +curl http://localhost:11434/api/tags +``` + +Pull the model you intend to use with Hermes (this playbook uses `qwen3.6:27b` as the example): + +```bash +ollama pull qwen3.6:27b +``` + +## Step 3. Install Hermes + +```bash +curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash +``` + +The installer will walk you through an interactive setup. Respond to each prompt in the order they appear: + +1. **"Install ripgrep for faster file search ffmpeg for TTS voice messages? [Y/n]"** — Press **Enter** to accept the default and install both helpers. + +2. **"How would you like to set up Hermes?"** — Choose **Quick setup** to proceed with the recommended defaults. + +3. **"Select Provider"** — Choose **Custom endpoint (enter URL manually)** so Hermes can be pointed at the model endpoint running on your DGX Spark. + +4. **"API base URL [e.g. https://api.example.com/v1]:"** — Enter the URL of your local model server. For a local Ollama endpoint, use `http://localhost:11434/v1`. + +5. **"API key [optional]"** — Leave blank and press **Enter**; no key is required for a local model. + +6. **Model selection** — The installer lists the models available from your local Ollama instance. Select one to use with Hermes (for example, `qwen3.6:27b`). + +7. **"Context length in tokens [leave blank for auto-detect]:"** — Press **Enter** to let Hermes auto-detect the context length from the selected model. + +8. **"Display name [Local (localhost:11434)]"** — Press **Enter** to accept the suggested label, or type a custom name to identify this endpoint in the Hermes UI. + +9. **"Connect a messaging platform? (Telegram, Discord, etc.)"** — Choose **Set up messaging now (recommended)** to configure a gateway during installation. + +10. **"Select platforms to configure:"** — Choose **Telegram**. The remaining steps in this playbook use Telegram as the example; the same flow applies to the other supported gateways. + +11. **"Telegram bot token:"** — Open Telegram and start a chat with [@BotFather](https://t.me/BotFather), follow its guided flow to create a new bot, then paste the token BotFather returns into this prompt. The terminal will not echo any characters as the token is pasted — this is expected. Press **Enter** to submit; the installer should respond with `Telegram token saved`. + +12. **"Allowed user IDs (comma-separated, leave empty for open access):"** — To restrict the bot to specific Telegram accounts, follow the on-screen instructions to look up your numeric Telegram user ID, then enter one or more IDs separated by commas. Leaving this field blank allows anyone who can reach the bot to use it, which is generally not recommended. + +13. **"Use your user ID (\) as the home channel? [Y/n]:"** — Press **Enter** to accept. This designates your own Telegram account as the default channel Hermes will use for proactive messages and scheduled deliveries. + +14. **"Install the gateway as a systemd service? (runs in background, starts on boot) [Y/n]:"** — Press **Enter** to accept. The gateway will run as a background service and start automatically whenever your DGX Spark boots. + +15. **"Choose how the gateway should run in the background:"** — Choose **System service**. The DGX Spark is typically an always-on machine, and a system service starts on boot without requiring an interactive login or the `linger` workaround that user services need. The service will still run under your user account so it can read your Hermes configuration; only installation requires `sudo`. + +16. **"Launch hermes chat now? [Y/n]:"** — Press **Enter** to launch the Hermes TUI immediately and verify the installation end-to-end. Once the TUI is open, type `hello` and press **Enter**; the agent should respond, confirming that the model endpoint and Hermes are wired up correctly. When you're done, type `/exit` to leave the chat and return to your shell. On exit, Hermes prints the exact command needed to resume this conversation later — `hermes --resume `. Save it if you want to pick up where you left off. + +17. **"Would you like to install the gateway as a background service? [Y/n]:"** — Press **Enter** to accept. This finalizes the gateway as a background service so it stays available for messaging-platform traffic outside of an interactive Hermes session. + +18. **Reload your shell** to make the `hermes` command available: + + ```bash + source ~/.bashrc + ``` + +## Step 4. Switch to a different Ollama model (optional) + +You configured an initial model during the Hermes install. To switch to a different one later, pull the new model with Ollama and then re-point Hermes at the same local endpoint. + +1. Pull the new model with Ollama (replace `` with the model you want): + + ```bash + ollama pull + ``` + +2. Launch the Hermes model picker: + + ```bash + hermes model + ``` + +3. At the **"Select Provider"** prompt, choose **Custom endpoint (enter URL manually)**. + +4. At the **"API base URL"** prompt, enter the same local Ollama endpoint as before: + + ``` + http://localhost:11434/v1 + ``` + +5. When the installer lists the models served by Ollama, choose the one you just pulled. Hermes will use it for subsequent sessions. + +## Step 5. Resume a previous Hermes session + +To pick up a past conversation, launch Hermes with the `--resume` flag and the session ID printed when you exited that chat: + +```bash +hermes --resume +``` + +The TUI will reopen with the prior conversation history restored, ready for follow-up prompts. + +## Step 6. Talk to Hermes from Telegram + +The Telegram gateway you configured during install is already running as a background service, so you can reach Hermes from any Telegram client without a terminal session. + +1. Open Telegram (mobile or desktop) and search for your bot by the username you assigned through @BotFather. + +2. Open the chat with the bot and tap **Start** (or send `/start`) on first contact. + +3. Send the message `hello`. Hermes will reply through the bot, confirming the gateway is wired to your DGX Spark and the underlying model. + +From here you can send any prompt you would normally type in the TUI — Hermes will run on your DGX Spark and stream the response back to Telegram. + +## Step 7. Update Hermes + +To upgrade an existing Hermes installation to the latest release, run: + +```bash +hermes update +``` + +The command pulls the latest Hermes version, applies any required dependency changes, and restarts the gateway service so the new version takes effect. + +## Step 8. Cleanup + +> [!WARNING] +> This removes the Hermes installation and the gateway service. By default, `~/.hermes/` (configuration, conversation history, and skills) is preserved unless you opt into a full uninstall at the on-screen prompt. + +Because the gateway was installed as a **System service** in Step 15, run the uninstall with `sudo` so it has permission to remove the system-scope systemd unit: + +```bash +sudo hermes uninstall +``` + +Follow the on-screen prompts to confirm removal. `sudo hermes uninstall` automatically: + +- Stops and removes the systemd gateway service. +- Removes the `hermes` wrapper script and the PATH entries added to your shell profile. +- Deletes the Hermes installation directory. + +## Step 9. Next steps + +1. **Inspect the agent's reasoning.** Inside the TUI, run `/reasoning show` to surface the model's intermediate reasoning alongside its responses. This is especially useful for following the agent's progress on multi-step or complex problems and for debugging unexpected answers. +2. **Try a multi-step task to trigger skill creation.** For example, ask the agent how to set up email — Hermes will walk through the configuration with you and, on completing a non-trivial task like this, may autonomously persist a reusable skill so the next email-related request is faster. +3. **Configure scheduled automations via the built-in cron.** For example, ask Hermes to check the price of a product online once a day and notify you on Telegram when it drops below a threshold. Hermes will schedule the task with its built-in cron and deliver each result through the messaging gateway you set up. + +## Troubleshooting + +| Symptom | Cause | Fix | +|---------|-------|-----| +| `hermes: command not found` after install | Shell profile not reloaded in the current session | Run `source ~/.bashrc` (or `source ~/.zshrc`) and retry. Open a new terminal if the issue persists. | +| Hermes installer can't list any models at the model-selection prompt | Ollama is not running or has no models pulled | Sanity-check Ollama in another terminal: list installed models with `ollama list`, hit the API with `curl http://localhost:11434/api/tags`, and confirm a model can actually serve requests by running `ollama run ` (e.g. `ollama run qwen3.6:27b`) and sending a test prompt. If the list is empty or the API is unreachable, start Ollama and pull a model with `ollama pull `, then re-run the Hermes installer. | +| `Connection refused` to `http://localhost:11434/v1` from Hermes | Ollama service not running on the default port | Start the Ollama service and confirm it is listening on `11434`. On systemd hosts: `systemctl status ollama` and `systemctl start ollama`. | +| Pasting the Telegram bot token shows nothing on the screen | Expected — the installer hides token characters as a security measure | Paste the token, then press **Enter**. The installer should respond with `Telegram token saved`. | +| Telegram bot does not reply when you send `hello` | Gateway service not running, or your account is not in the allowed user IDs list | Check the gateway service status with `systemctl status` (look for the Hermes gateway unit installed in Step 14). If your Telegram user ID was not added during install, re-run `hermes` setup or update the gateway config to include it. | +| Out-of-memory or very slow inference | Selected Ollama model is too large for available GPU memory, or other GPU workloads are competing | Check usage with `nvidia-smi`, free GPU memory by closing other workloads, or pull a smaller model with `ollama pull ` and switch to it via `hermes model`. | +| `hermes update` fails or the gateway does not restart | Gateway service still bound to the previous version, or insufficient permissions on a system-service install | Re-run `hermes update` with `sudo` if the gateway was installed as a **System service**. If the service is stuck, restart it manually: `sudo systemctl restart `. | +| Cannot resume a previous session | The `` value is missing or wrong | Launch `hermes` without `--resume` to start fresh; past session IDs are printed to the terminal each time you `/exit` a chat. | + +> [!NOTE] +> DGX Spark uses a Unified Memory Architecture (UMA), which enables dynamic memory sharing between the GPU and CPU. +> With many applications still updating to take advantage of UMA, you may encounter memory issues even when within +> the memory capacity of DGX Spark. If that happens, manually flush the buffer cache with: +```bash +sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' +``` + +For latest known issues, please review the [DGX Spark User Guide](https://docs.nvidia.com/dgx/dgx-spark/known-issues.html). diff --git a/nvidia/trt-llm/README.md b/nvidia/trt-llm/README.md index 5d19853..2ce06f3 100644 --- a/nvidia/trt-llm/README.md +++ b/nvidia/trt-llm/README.md @@ -57,7 +57,7 @@ inference through kernel-level optimizations, efficient memory layouts, and adva - DGX Spark device - NVIDIA drivers compatible with CUDA 12.x: `nvidia-smi` -- Docker installed and GPU support configured: `docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5 nvidia-smi` +- Docker installed and GPU support configured: `docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc13 nvidia-smi` - Hugging Face account with token for model access: `echo $HF_TOKEN` - Sufficient GPU VRAM (40GB+ recommended for 70B models) - Internet connectivity for downloading models and container images @@ -75,6 +75,9 @@ The following models are supported with TensorRT-LLM on Spark. All listed models | Model | Quantization | Support Status | HF Handle | |-------|-------------|----------------|-----------| +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | BF16 | ✅ | `nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16` | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | FP8 | ✅ | `nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-FP8` | +| **Nemotron-3-Nano-Omni-30B-A3B-Reasoning** | NVFP4 | ✅ | `nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4` | | **Nemotron-3-Super-120B** | NVFP4 | ✅ | `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4` | | **GPT-OSS-20B** | MXFP4 | ✅ | `openai/gpt-oss-20b` | | **GPT-OSS-120B** | MXFP4 | ✅ | `openai/gpt-oss-120b` | @@ -104,8 +107,8 @@ Reminder: not all model architectures are supported for NVFP4 quantization. * **Duration**: 45-60 minutes for setup and API server deployment * **Risk level**: Medium - container pulls and model downloads may fail due to network issues * **Rollback**: Stop inference servers and remove downloaded models to free resources. -* **Last Updated:** 03/12/2026 - * Introduce Nemotron-3-Super-120B support on TRT-LLM +* **Last Updated:** 04/28/2026 + * Docker image 1.3.0rc13; Nemotron Omni reasoning BF16, FP8, NVFP4 in matrix ## Single Spark @@ -136,7 +139,7 @@ models and containers. nvidia-smi ## Verify Docker GPU support -docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5 nvidia-smi +docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc13 nvidia-smi ``` @@ -146,7 +149,7 @@ docker run --rm --gpus all nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5 nvidia-s ## Set `HF_TOKEN` for model access. export HF_TOKEN= -export DOCKER_IMAGE="nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc5" +export DOCKER_IMAGE="nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc13" ``` ## Step 4. Validate TensorRT-LLM installation @@ -161,8 +164,8 @@ docker run --rm -it --gpus all \ Expected output: ``` -[TensorRT-LLM] TensorRT-LLM version: 1.3.0rc5 -TensorRT-LLM version: 1.3.0rc5 +[TensorRT-LLM] TensorRT-LLM version: 1.3.0rc13 +TensorRT-LLM version: 1.3.0rc13 ``` ## Step 5. Create cache directory @@ -290,6 +293,43 @@ sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' Serve with OpenAI-compatible API via trtllm-serve: +#### Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 + +This example writes **`nano_v3.yaml`** for KV cache, MoE, and CUDA graph settings, then starts **`trtllm-serve`** on port **8000** with Nemotron Omni reasoning parsers. + +```bash +export MODEL_HANDLE="nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16" + +docker run --name trtllm_llm_server --rm -it --gpus all --ipc host --network host \ + -e HF_TOKEN=$HF_TOKEN \ + -e MODEL_HANDLE="$MODEL_HANDLE" \ + -v $HOME/.cache/huggingface/:/root/.cache/huggingface/ \ + $DOCKER_IMAGE \ + bash -c ' + hf download $MODEL_HANDLE && \ + cat > nano_v3.yaml < Date: Wed, 29 Apr 2026 18:42:01 +0000 Subject: [PATCH 5/5] chore: Regenerate all playbooks --- README.md | 2 - nvidia/hermes-agent/README.md | 262 ------------------ nvidia/i4h-so-arm/README.md | 488 ---------------------------------- 3 files changed, 752 deletions(-) delete mode 100644 nvidia/hermes-agent/README.md delete mode 100644 nvidia/i4h-so-arm/README.md diff --git a/README.md b/README.md index bf07497..5458d39 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,6 @@ Each playbook includes prerequisites, step-by-step instructions, troubleshooting - [CUDA-X Data Science](nvidia/cuda-x-data-science/) - [DGX Dashboard](nvidia/dgx-dashboard/) - [FLUX.1 Dreambooth LoRA Fine-tuning](nvidia/flux-finetuning/) -- [Hermes-agent with Local Models](nvidia/hermes-agent/) -- [Develop and Deploy Healthcare Robots with Isaac For Healthcare](nvidia/i4h-so-arm/) - [Install and Use Isaac Sim and Isaac Lab](nvidia/isaac/) - [Optimized JAX](nvidia/jax/) - [Live VLM WebUI](nvidia/live-vlm-webui/) diff --git a/nvidia/hermes-agent/README.md b/nvidia/hermes-agent/README.md deleted file mode 100644 index 1adc24a..0000000 --- a/nvidia/hermes-agent/README.md +++ /dev/null @@ -1,262 +0,0 @@ -# Hermes-agent with Local Models - -> Install and run the Hermes self-improving AI agent on DGX Spark. - -## Table of Contents - -- [Overview](#overview) -- [Instructions](#instructions) -- [Troubleshooting](#troubleshooting) - ---- - -## Overview - -## Basic idea - -[Hermes Agent](https://github.com/NousResearch/hermes-agent) is a **self-improving** AI agent built by [Nous Research](https://nousresearch.com). It runs as a terminal TUI on your machine and, through a built-in gateway, can also be reached from messaging platforms like Telegram, Discord, and Slack. It creates skills from experience, improves them during use, persists memory across sessions, and can run scheduled tasks via its built-in cron. - -Running Hermes and its LLM **fully on your DGX Spark** keeps your conversations and data private and avoids ongoing cloud API costs. DGX Spark is well suited for this: it runs Linux, is designed to stay on, and has **128GB memory**, so you can serve large local models for better reasoning quality and connect to the agent from your phone over Telegram while the heavy work runs locally. - -## What you'll accomplish - -You will have Hermes installed on your DGX Spark and connected to a local LLM served by Ollama. You can chat with the agent from the DGX Spark terminal and from Telegram on your phone or laptop. The gateway runs as a system service, so the agent stays reachable across reboots without anyone logging in. - -- Install Ollama and pull a local model -- Install Hermes and configure it against the local Ollama endpoint -- Set up a Telegram bot so you can message Hermes from any Telegram client -- Resume past sessions, switch models, update, and uninstall using the `hermes` CLI - -## Popular use cases - -- **Personal assistant from your phone**: Chat with Hermes via Telegram while the model runs on your Spark — manage email drafts, summarize docs, or answer questions on the go. -- **Multi-step task automation**: Ask the agent to walk you through configurations (e.g., setting up email); on non-trivial tasks Hermes can autonomously persist a reusable skill for next time. -- **Scheduled checks**: Use the built-in cron to watch a product price online or run a daily check, and have results delivered to your Telegram home channel. -- **Reasoning-visible problem solving**: Use `/reasoning show` in the TUI to follow the agent's intermediate reasoning on complex problems. - -## What to know before starting - -- Basic use of the Linux terminal and a text editor -- Familiarity with Ollama or willingness to follow the [Ollama playbook](../ollama/) first -- A Telegram account if you want to use the messaging gateway -- Awareness of the security considerations below - -## Important: security and risks - -AI agents that can execute commands and reach external services introduce real risks. Read the upstream guidance: [Hermes documentation](https://hermes-agent.nousresearch.com/docs/). - -Main risks: - -1. **Data exposure**: Personal information or files on your DGX Spark may be leaked through agent actions or messaging channels. -2. **Unauthorized access**: A Telegram bot left open to anyone who finds it can be misused; a model endpoint exposed beyond `localhost` can be abused. - -You cannot eliminate all risk; proceed at your own risk. **Recommended security measures:** - -- **Restrict the Telegram bot** by entering one or more numeric Telegram user IDs at the *"Allowed user IDs"* prompt during install. Leaving this blank allows anyone who finds the bot to use it. -- Keep the Ollama endpoint bound to **`localhost` only**; do not expose `http://:11434` to your LAN or the public internet without strong authentication. -- Run Hermes on a Spark dedicated to this purpose where possible, and only place files on it that the agent is allowed to access. -- **Monitor activity**: Periodically review the gateway service logs (`journalctl -u `) and the Hermes session history. - -## Prerequisites - -- DGX Spark running Linux, connected to your network -- Terminal (SSH or local) access to the Spark -- `curl` and `git` installed (verified in Step 1 of the instructions) -- Enough disk and GPU memory for the Ollama model you plan to serve (the playbook uses `qwen3.6:27b` as the example; pick a smaller model if you want a faster first install) -- A Telegram account and the ability to create a bot via [@BotFather](https://t.me/BotFather) if you plan to use the messaging gateway - -## Time and risk - -- **Duration**: About 30 minutes for install and first-time setup; model download time depends on size and network speed. -- **Risk level**: **Medium** — the agent can execute commands, persist skills, and is reachable from Telegram. Risk increases if you skip the allowed-user-IDs restriction or expose the local model endpoint beyond `localhost`. Always follow the security measures above. -- **Rollback**: Run `hermes uninstall` to remove Hermes, the gateway service, and the shell-profile entry. Uninstall Ollama separately if desired. -- **Last Updated**: 2026-04-26 - - First Publication - -## Instructions - -## Step 1. Verify your environment - -Before installing Hermes, confirm that your DGX Spark is running DGX OS, has network access, and exposes the basic command-line tools used during install. - -```bash -uname -a -curl --version -git --version -``` - -Expected output should show DGX OS and working `curl` / `git` binaries. - -## Step 2. Install Ollama and pull a model - -Hermes will be configured against a local Ollama endpoint, so Ollama must be installed and serving at least one model before you run the Hermes installer. If you have already completed the [Ollama playbook](../ollama/), you can skip this step. - -Install Ollama: - -```bash -curl -fsSL https://ollama.com/install.sh | sh -``` - -Verify the Ollama service is running and reachable on the default port: - -```bash -curl http://localhost:11434/api/tags -``` - -Pull the model you intend to use with Hermes (this playbook uses `qwen3.6:27b` as the example): - -```bash -ollama pull qwen3.6:27b -``` - -## Step 3. Install Hermes - -```bash -curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -``` - -The installer will walk you through an interactive setup. Respond to each prompt in the order they appear: - -1. **"Install ripgrep for faster file search ffmpeg for TTS voice messages? [Y/n]"** — Press **Enter** to accept the default and install both helpers. - -2. **"How would you like to set up Hermes?"** — Choose **Quick setup** to proceed with the recommended defaults. - -3. **"Select Provider"** — Choose **Custom endpoint (enter URL manually)** so Hermes can be pointed at the model endpoint running on your DGX Spark. - -4. **"API base URL [e.g. https://api.example.com/v1]:"** — Enter the URL of your local model server. For a local Ollama endpoint, use `http://localhost:11434/v1`. - -5. **"API key [optional]"** — Leave blank and press **Enter**; no key is required for a local model. - -6. **Model selection** — The installer lists the models available from your local Ollama instance. Select one to use with Hermes (for example, `qwen3.6:27b`). - -7. **"Context length in tokens [leave blank for auto-detect]:"** — Press **Enter** to let Hermes auto-detect the context length from the selected model. - -8. **"Display name [Local (localhost:11434)]"** — Press **Enter** to accept the suggested label, or type a custom name to identify this endpoint in the Hermes UI. - -9. **"Connect a messaging platform? (Telegram, Discord, etc.)"** — Choose **Set up messaging now (recommended)** to configure a gateway during installation. - -10. **"Select platforms to configure:"** — Choose **Telegram**. The remaining steps in this playbook use Telegram as the example; the same flow applies to the other supported gateways. - -11. **"Telegram bot token:"** — Open Telegram and start a chat with [@BotFather](https://t.me/BotFather), follow its guided flow to create a new bot, then paste the token BotFather returns into this prompt. The terminal will not echo any characters as the token is pasted — this is expected. Press **Enter** to submit; the installer should respond with `Telegram token saved`. - -12. **"Allowed user IDs (comma-separated, leave empty for open access):"** — To restrict the bot to specific Telegram accounts, follow the on-screen instructions to look up your numeric Telegram user ID, then enter one or more IDs separated by commas. Leaving this field blank allows anyone who can reach the bot to use it, which is generally not recommended. - -13. **"Use your user ID (\) as the home channel? [Y/n]:"** — Press **Enter** to accept. This designates your own Telegram account as the default channel Hermes will use for proactive messages and scheduled deliveries. - -14. **"Install the gateway as a systemd service? (runs in background, starts on boot) [Y/n]:"** — Press **Enter** to accept. The gateway will run as a background service and start automatically whenever your DGX Spark boots. - -15. **"Choose how the gateway should run in the background:"** — Choose **System service**. The DGX Spark is typically an always-on machine, and a system service starts on boot without requiring an interactive login or the `linger` workaround that user services need. The service will still run under your user account so it can read your Hermes configuration; only installation requires `sudo`. - -16. **"Launch hermes chat now? [Y/n]:"** — Press **Enter** to launch the Hermes TUI immediately and verify the installation end-to-end. Once the TUI is open, type `hello` and press **Enter**; the agent should respond, confirming that the model endpoint and Hermes are wired up correctly. When you're done, type `/exit` to leave the chat and return to your shell. On exit, Hermes prints the exact command needed to resume this conversation later — `hermes --resume `. Save it if you want to pick up where you left off. - -17. **"Would you like to install the gateway as a background service? [Y/n]:"** — Press **Enter** to accept. This finalizes the gateway as a background service so it stays available for messaging-platform traffic outside of an interactive Hermes session. - -18. **Reload your shell** to make the `hermes` command available: - - ```bash - source ~/.bashrc - ``` - -## Step 4. Switch to a different Ollama model (optional) - -You configured an initial model during the Hermes install. To switch to a different one later, pull the new model with Ollama and then re-point Hermes at the same local endpoint. - -1. Pull the new model with Ollama (replace `` with the model you want): - - ```bash - ollama pull - ``` - -2. Launch the Hermes model picker: - - ```bash - hermes model - ``` - -3. At the **"Select Provider"** prompt, choose **Custom endpoint (enter URL manually)**. - -4. At the **"API base URL"** prompt, enter the same local Ollama endpoint as before: - - ``` - http://localhost:11434/v1 - ``` - -5. When the installer lists the models served by Ollama, choose the one you just pulled. Hermes will use it for subsequent sessions. - -## Step 5. Resume a previous Hermes session - -To pick up a past conversation, launch Hermes with the `--resume` flag and the session ID printed when you exited that chat: - -```bash -hermes --resume -``` - -The TUI will reopen with the prior conversation history restored, ready for follow-up prompts. - -## Step 6. Talk to Hermes from Telegram - -The Telegram gateway you configured during install is already running as a background service, so you can reach Hermes from any Telegram client without a terminal session. - -1. Open Telegram (mobile or desktop) and search for your bot by the username you assigned through @BotFather. - -2. Open the chat with the bot and tap **Start** (or send `/start`) on first contact. - -3. Send the message `hello`. Hermes will reply through the bot, confirming the gateway is wired to your DGX Spark and the underlying model. - -From here you can send any prompt you would normally type in the TUI — Hermes will run on your DGX Spark and stream the response back to Telegram. - -## Step 7. Update Hermes - -To upgrade an existing Hermes installation to the latest release, run: - -```bash -hermes update -``` - -The command pulls the latest Hermes version, applies any required dependency changes, and restarts the gateway service so the new version takes effect. - -## Step 8. Cleanup - -> [!WARNING] -> This removes the Hermes installation and the gateway service. By default, `~/.hermes/` (configuration, conversation history, and skills) is preserved unless you opt into a full uninstall at the on-screen prompt. - -Because the gateway was installed as a **System service** in Step 15, run the uninstall with `sudo` so it has permission to remove the system-scope systemd unit: - -```bash -sudo hermes uninstall -``` - -Follow the on-screen prompts to confirm removal. `sudo hermes uninstall` automatically: - -- Stops and removes the systemd gateway service. -- Removes the `hermes` wrapper script and the PATH entries added to your shell profile. -- Deletes the Hermes installation directory. - -## Step 9. Next steps - -1. **Inspect the agent's reasoning.** Inside the TUI, run `/reasoning show` to surface the model's intermediate reasoning alongside its responses. This is especially useful for following the agent's progress on multi-step or complex problems and for debugging unexpected answers. -2. **Try a multi-step task to trigger skill creation.** For example, ask the agent how to set up email — Hermes will walk through the configuration with you and, on completing a non-trivial task like this, may autonomously persist a reusable skill so the next email-related request is faster. -3. **Configure scheduled automations via the built-in cron.** For example, ask Hermes to check the price of a product online once a day and notify you on Telegram when it drops below a threshold. Hermes will schedule the task with its built-in cron and deliver each result through the messaging gateway you set up. - -## Troubleshooting - -| Symptom | Cause | Fix | -|---------|-------|-----| -| `hermes: command not found` after install | Shell profile not reloaded in the current session | Run `source ~/.bashrc` (or `source ~/.zshrc`) and retry. Open a new terminal if the issue persists. | -| Hermes installer can't list any models at the model-selection prompt | Ollama is not running or has no models pulled | Sanity-check Ollama in another terminal: list installed models with `ollama list`, hit the API with `curl http://localhost:11434/api/tags`, and confirm a model can actually serve requests by running `ollama run ` (e.g. `ollama run qwen3.6:27b`) and sending a test prompt. If the list is empty or the API is unreachable, start Ollama and pull a model with `ollama pull `, then re-run the Hermes installer. | -| `Connection refused` to `http://localhost:11434/v1` from Hermes | Ollama service not running on the default port | Start the Ollama service and confirm it is listening on `11434`. On systemd hosts: `systemctl status ollama` and `systemctl start ollama`. | -| Pasting the Telegram bot token shows nothing on the screen | Expected — the installer hides token characters as a security measure | Paste the token, then press **Enter**. The installer should respond with `Telegram token saved`. | -| Telegram bot does not reply when you send `hello` | Gateway service not running, or your account is not in the allowed user IDs list | Check the gateway service status with `systemctl status` (look for the Hermes gateway unit installed in Step 14). If your Telegram user ID was not added during install, re-run `hermes` setup or update the gateway config to include it. | -| Out-of-memory or very slow inference | Selected Ollama model is too large for available GPU memory, or other GPU workloads are competing | Check usage with `nvidia-smi`, free GPU memory by closing other workloads, or pull a smaller model with `ollama pull ` and switch to it via `hermes model`. | -| `hermes update` fails or the gateway does not restart | Gateway service still bound to the previous version, or insufficient permissions on a system-service install | Re-run `hermes update` with `sudo` if the gateway was installed as a **System service**. If the service is stuck, restart it manually: `sudo systemctl restart `. | -| Cannot resume a previous session | The `` value is missing or wrong | Launch `hermes` without `--resume` to start fresh; past session IDs are printed to the terminal each time you `/exit` a chat. | - -> [!NOTE] -> DGX Spark uses a Unified Memory Architecture (UMA), which enables dynamic memory sharing between the GPU and CPU. -> With many applications still updating to take advantage of UMA, you may encounter memory issues even when within -> the memory capacity of DGX Spark. If that happens, manually flush the buffer cache with: -```bash -sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' -``` - -For latest known issues, please review the [DGX Spark User Guide](https://docs.nvidia.com/dgx/dgx-spark/known-issues.html). diff --git a/nvidia/i4h-so-arm/README.md b/nvidia/i4h-so-arm/README.md deleted file mode 100644 index 9267d34..0000000 --- a/nvidia/i4h-so-arm/README.md +++ /dev/null @@ -1,488 +0,0 @@ -# Develop and Deploy Healthcare Robots with Isaac For Healthcare - -> End-to-end development and deployment of healthcare robots on DGX Spark - -## Table of Contents - -- [Overview](#overview) -- [Part 1: Preparation](#part-1-preparation) - - [Set Up Conda Environment](#set-up-conda-environment) - - [Set Up Docker Environment](#set-up-docker-environment) - - [Set Up the Scene](#set-up-the-scene) - - [Calibrate the Robot](#calibrate-the-robot) - - [Test Teleoperation](#test-teleoperation) -- [Part 2: Synthetic Data Generation](#part-2-synthetic-data-generation) -- [Part 3: Real-World Data Collection](#part-3-real-world-data-collection) -- [Part 4: GR00T N1.5 Fine-Tuning](#part-4-gr00t-n15-fine-tuning) -- [Part 5: Deploying Trained Robotic Policy](#part-5-deploying-trained-robotic-policy) - ---- - -## Overview - -## Basic idea - -Robotics and physical AI are driving the next wave of AI breakthroughs. Developing physical AI requires [3 computers](https://blogs.nvidia.com/blog/three-computers-robotics/) — 1. A simulation computer to generate synthetic data and digital twins, bridging the data gap. 2. A training computer to build the necessary foundation and world models. 3. A runtime computer to handle real-time robotic inference and intelligent interactions. - -This tutorial demonstrates the development and deployment of an autonomous healthcare robot using [NVIDIA Isaac For Healthcare](https://developer.nvidia.com/blog/introducing-nvidia-isaac-for-healthcare-an-ai-powered-medical-robotics-development-platform/) on a single [DGX Spark](https://www.nvidia.com/en-us/products/workstations/dgx-spark/), consolidating the 3-computers developer workflow onto one hardware platform. The example focuses on the [SO-101 robot](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) acting as a scrub nurse—a specialized nursing professional working directly in the sterile field during surgical procedures—to perform a crucial pick-and-place task — autonomously picking up a pair of surgical scissors and placing them into a surgical tray. - -## What you'll accomplish - -You'll complete the full development lifecycle of an autonomous healthcare robot on DGX Spark, covering the following stages: - -- **Part 1 — Preparation.** Set up the hardware, software environments, and task environment. -- **Part 2 — Generating synthetic data with Isaac Sim.** Collect synthetic pick-and-place demonstrations using teleoperation in a simulated environment. -- **Part 3 — Collecting real-world data.** Collect real-world teleoperation data with the physical SO-101 robot. -- **Part 4 — Fine-tuning the GR00T N1.5 model.** Fine-tune a pretrained GR00T N1.5 model using the collected data. -- **Part 5 — Deploying trained robotic policy.** Deploy the fine-tuned model in both simulated and real-world environments. - -## What to know before starting - -- Experience with Linux command line -- Basic understanding of Docker containers -- Familiarity with Python and conda environments -- Basic knowledge of robotics concepts (teleoperation, calibration) -- Familiarity with machine learning concepts (helpful but not required) - -## Prerequisites - -**Hardware Requirements:** -- [NVIDIA DGX Spark](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) with FastOS version 1.91.+ (verify with `cat /etc/fastos-release`; upgrade if necessary following [steps here](https://docs.nvidia.com/dgx/dgx-spark/system-recovery.html#recovery-process-steps)) -- [SO-101 Robot](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) with both leader & follower arms and wrist camera module (ensure mounting/fixation tools are included or acquired separately) -- USB-C splitter (needed since 4 USB connections are required and DGX Spark has only 3 available USB-C ports; use a high-quality splitter to minimize latency) -- OpenCV compatible USB web camera (for the room camera) -- Surgical tray (dimensions 24cm x 16cm x 5cm) -- Surgical scissors (length 18cm) -- Scene setup accessories — table, table cloth, and a camera stand/holder for the room camera - -**Software Requirements:** -- NVIDIA DGX OS -- Miniconda: [installation guidelines](https://www.anaconda.com/docs/getting-started/miniconda/install#aws-graviton2%2Farm64) -- Docker (pre-installed on DGX OS) - -## Ancillary files - -All required assets can be found in the [NVIDIA Isaac-For-Healthcare-Workflows repository](https://github.com/isaac-for-healthcare/i4h-workflows). - -- `workflows/so_arm_starter/` - Source code for the robotic scrub nurse example workflow -- `tools/env_setup_so_arm_starter.sh` - Environment setup script for the conda environment -- `workflows/so_arm_starter/docker/dgx.Dockerfile` - Dockerfile for the Docker environment - -## Time & risk - -* **Estimated time:** Approximately 2 days (GR00T N1.5 fine-tuning at 30,000 steps takes around 24 hours on DGX Spark; data collection and other setup steps require several additional hours) -* **Risk level:** Medium - * Robot calibration must remain consistent throughout the tutorial; re-calibrating after data collection or training may require restarting the entire process - * Large downloads and Docker builds may take significant time - * Leader and follower arm power cords have different voltages—do not mix them up -* **Rollback:** Conda environment and Docker image can be removed to revert software changes. Collected datasets can be deleted from `~/.cache/huggingface/lerobot/`. - -## Part 1: Preparation - -## Step 1. Prepare Hardware and Accessories - -Required components: - -* [**NVIDIA DGX Spark**](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) — Verify that FastOS version is 1.91.+ with `cat /etc/fastos-release`; upgrade if necessary following [steps here](https://docs.nvidia.com/dgx/dgx-spark/system-recovery.html#recovery-process-steps). -* [**SO-101 Robot**](https://github.com/TheRobotStudio/SO-ARM100?tab=readme-ov-file) — Requires both leader & follower arms with wrist camera module. Ensure mounting/fixation tools are included or acquired separately. -* **USB-C Splitter** — Needed since 4 USB connections (2 USB-C for arms, 2 USB-A for cameras) are required and DGX Spark has only 3 available USB-C ports. Use a high-quality splitter to minimize latency. -* **OpenCV compatible USB web camera** — For the room camera. -* **Surgical Tray** — Dimensions 24cm x 16cm x 5cm. -* **Surgical Scissors** — Length 18cm. -* **Scene Setup Accessories** — Table, table cloth, and a camera stand/holder for the room camera. - -## Step 2. Set Up Software Environments - -Power on DGX Spark and open a terminal window. - -Create a folder named `workspace` under your home directory, and clone the NVIDIA Isaac-For-Healthcare-Workflows repository `i4h-workflows` from GitHub: - -```shell -mkdir ~/workspace -cd ~/workspace && git clone https://github.com/isaac-for-healthcare/i4h-workflows.git -``` - -The source code for several Isaac For Healthcare example workflows is in this repository, including the robotic scrub nurse example at `/workflows/so_arm_starter`. - -This tutorial requires two separate software environments on DGX Spark: - -1. A conda environment for most of the tasks. -2. A docker environment for all tasks that require Isaac-GR00T. - -A separate docker environment was needed primarily because of the complexity in installing certain Isaac-GR00T dependencies, like `flash_attn`, on the DGX Spark's native arm64 OS. - -### Set Up Conda Environment - -First, ensure Miniconda is installed on DGX Spark. If not, follow the [installation guidelines here](https://www.anaconda.com/docs/getting-started/miniconda/install#aws-graviton2%2Farm64). Then, create a new conda environment and install the necessary dependencies for this tutorial: - -```shell -conda create -n so_arm_starter python=3.11 -y -conda activate so_arm_starter -cd && bash tools/env_setup_so_arm_starter.sh -``` - -Installation takes about 20 minutes and, when complete, prints a success message to the terminal. - -```shell -========================================== -Environment setup script finished. -========================================== -``` - -After installation, **deactivate and reactivate the `so_arm_starter` environment** to apply configurations: - -```shell -conda deactivate -conda activate so_arm_starter -``` - -After reactivating the conda environment, set the following environment variable: - -```shell -export PYTHONPATH=/workflows/so_arm_starter/scripts -``` - -To avoid manually setting the environment variable each time you activate `so_arm_starter`, optionally add the command to `~/.bashrc`. Source the file immediately after adding it to activate it in the current session. - -### Set Up Docker Environment - -To set up the docker environment, build a docker image using the `dgx.Dockerfile` provided under `/workflows/so_arm_starter/docker`: - -```shell -cd /workflows/so_arm_starter/docker -docker build -t soarm-dgx -f dgx.Dockerfile . -``` - -The build takes about 20 minutes, creating a docker image named `soarm-dgx`. - -## Step 3. Set Up the Task Environment - -### Set Up the Scene - -To set up the scrub nurse pick-and-place scene: - -1. **Mount Arms:** Firmly mount the follower arm on the table and the leader arm nearby for comfortable teleoperation. -2. **Set Scene:** Place the table cloth, surgical tray, and scissors on the table. Use a non-reflective, dark table cloth to minimize reflections and maintain consistent background color. Fixate the table cloth to the table to prevent movement when the follower's gripper touches it. Ensure the tray and scissors are within easy reach of the follower arm's gripper. -3. **Mount Camera:** Mount the room camera above the table for a top-down view. While other positions (like a side-view) might offer better object localization, the top-down view minimizes environmental elements, focusing only on task-relevant objects for a more robust setup. - -To finally adjust the table and room camera stand for optimal wrist and room camera views, power on the robot and cameras. Connect the following to the DGX Spark: - -* Leader and follower arms (2x USB-C) -* Wrist camera (1x USB-A) -* Room camera (1x USB-A or USB-C) - -Due to limited DGX Spark USB-C ports, a USB-C splitter (and optional USB-A/C converters) is needed. Power the leader and follower arms, **taking care not to mix up the power cords as voltages differ.** Use a camera tool (e.g., Cheese on DGX Spark) to check live feeds and finalize positioning. - -### Calibrate the Robot - -First, identify the device IDs for the two robot arms and the two cameras. - -Open a new terminal on DGX Spark. Activate the `so_arm_starter` conda environment: - -```shell -conda activate so_arm_starter -``` - -Execute the following command and follow the on-screen instructions to identify the device IDs of the leader arm and the follower arm: - -```shell -python -m lerobot.find_port -``` - -On a Linux-based system, the device IDs are usually `/dev/ttyACM0` and `/dev/ttyACM1`. - -Execute the following command to identify the wrist and room camera indices: - -```shell -python -m lerobot.find_cameras -``` - -The console should list 2 cameras with their indices (e.g., `/dev/video0` and `/dev/video2`). This command also captures and saves the current camera frames as distinct PNG images in `outputs/captured_images/`, using camera indices in the filename for easy identification and verification of feeds. - -Set access permissions for the robot arms before calibration by running: - -```shell -sudo chmod 666 /dev/ttyACM0 -sudo chmod 666 /dev/ttyACM1 -``` - -Adjust device IDs as needed. **Execute these commands every time the robot disconnects from and reconnects to DGX Spark.** - -Run the following commands in the terminal to calibrate the leader arm and the follower arm: - -```shell -## Leader arm: -python -m lerobot.calibrate --teleop.type=so101_leader --teleop.port=/dev/ttyACM0 --teleop.id=so101_leader - -## Follower arm: -python -m lerobot.calibrate --robot.type=so101_follower --robot.port=/dev/ttyACM1 --robot.id=so101_follower -``` - -Adjust device IDs and customize `--teleop.id` and `--robot.id` to set different device names if needed. Then, follow on-screen instructions and refer to the [video here](https://huggingface.co/docs/lerobot/so101#calibration-video) for proper calibration. - -> [!WARNING] -> Maintain *one* single follower arm calibration for this tutorial. Re-calibrating after collecting data or training the GR00T model risks needing to restart everything, as subsequent steps rely on the initial calibration. - -### Test Teleoperation - -To complete the preparation, teleoperate the follower arm using the leader arm. - -Run the following command to teleoperate without camera feeds: - -```shell -python -m lerobot.teleoperate \ ---robot.type=so101_follower \ ---robot.port=/dev/ttyACM1 \ ---robot.id=so101_follower \ ---teleop.type=so101_leader \ ---teleop.port=/dev/ttyACM0 \ ---teleop.id=so101_leader -``` - -Adjust the `--robot.port`, `--teleop.port`, `--robot.id` and `--teleop.id` arguments if needed. - -Run the following command to teleoperate with camera feeds: - -```shell -python -m lerobot.teleoperate \ ---robot.type=so101_follower \ ---robot.port=/dev/ttyACM1 \ ---robot.id=so101_follower \ ---robot.cameras="{wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30}, room: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \ ---teleop.type=so101_leader \ ---teleop.port=/dev/ttyACM0 \ ---teleop.id=so101_leader \ ---display_data=true -``` - -Adjust device IDs, names and camera indices if needed. - -During teleoperation with camera feeds, the [Rerun viewer](https://rerun.io/) UI appears, showing real-time views from both cameras and the robot's motor action data. - -## Part 2: Synthetic Data Generation - -## Step 1. Launch Isaac Sim for Data Collection - -Ensure the leader arm is powered on and connected to DGX Spark. Open a new terminal on DGX Spark, activate the `so_arm_starter` conda environment and set the `PYTHONPATH`: - -```shell -conda activate so_arm_starter -export PYTHONPATH=/workflows/so_arm_starter/scripts -``` - -Then, run the following command in the terminal: - -```shell -python -m simulation.environments.teleoperation_record \ - --port=/dev/ttyACM0 \ - --enable_cameras \ - --record \ - --dataset_path=./data-collection-sim/dataset.hdf5 -``` - -If needed, adjust the leader arm device ID and modify the `--dataset_path` argument to save data elsewhere. - -The command launches [Isaac Sim](https://developer.nvidia.com/isaac/sim), loading a scene with a follower arm, table, surgical scissors, and a tray. The initial load may take about 2 minutes; if Isaac Sim seems unresponsive, do not force quit—wait for it to load fully. - -To change the simulated follower arm's color to match your physical robot, go to the `Stage` panel (right side of Isaac Sim) → `World` → `envs` → `env_0` → `robot` → `Looks` → `material_a_3d_printed`, then under the `Property` tab, adjust the `Albedo Color`. - -The first command run requires leader arm calibration, even if previously done, due to a different program-specific calibration file. Your existing calibration remains unchanged. - -## Step 2. Collect Synthetic Pick-and-Place Demonstrations - -To teleoperate the robot in Isaac Sim and collect synthetic pick-and-place demonstrations: - -* Press "B" to begin teleoperation; the robot moves to the initial position. -* Use the physical leader arm to control the virtual follower arm for the pick-and-place task. -* Press "N" to save a successful episode. -* Press "R" to restart without saving. -* Scissors position and angle are slightly randomized per new episode. -* Press Ctrl + C to quit. - -Use these shortcuts for Isaac Sim viewport navigation: - -* "F" key after clicking the robot to auto-focus. -* Middle mouse wheel to zoom. -* "ALT" + left mouse drag to change the view angle. -* Middle mouse wheel click + drag to move in the viewport. - -Collecting around 70 synthetic episodes is sufficient for this tutorial. - -## Step 3. Convert Data to LeRobot Format - -After collecting the synthetic data, convert them to the Hugging Face [LeRobot](https://github.com/huggingface/lerobot) dataset format for fine-tuning the Isaac GR00T model: - -```shell -python -m training.hdf5_to_lerobot \ ---repo_id=spark/scrub-nurse-sim \ ---hdf5_path=./data-collection-sim/dataset.hdf5 \ ---task_description="Grip the scissors and put them into the tray." -``` - -Modify `--repo_id` and `--task_description` as needed, but ensure a meaningful task description. The resulting dataset, containing motor actions, wrist camera, and room camera recordings, is stored under `/home/$USER/.cache/huggingface/lerobot/`. - -## Part 3: Real-World Data Collection - -## Step 1. Set Up for Real-World Data Collection - -Ensure the leader arm, follower arm, wrist camera, and room camera are connected to DGX Spark. On DGX Spark, open a new terminal, activate the `so_arm_starter` conda environment: - -```shell -conda activate so_arm_starter -``` - -## Step 2. Collect Real-World Data Episodes - -Run the following command to collect real-world data episodes as LeRobot dataset: - -```shell -python -m lerobot.record \ ---robot.type=so101_follower \ ---robot.port=/dev/ttyACM1 \ ---robot.cameras="{wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30}, room: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \ ---robot.id=so101_follower \ ---teleop.type=so101_leader \ ---teleop.port=/dev/ttyACM0 \ ---teleop.id=so101_leader \ ---display_data=true \ ---dataset.repo_id="spark/scrub-nurse-real" \ ---dataset.num_episodes=20 \ ---dataset.single_task="Grip the scissors and put them into the tray." \ ---dataset.push_to_hub=false -``` - -Modify robot device IDs, names and camera indices to match yours. Ensure `--dataset.single_task` matches the task description for synthetic data collection. You can change `--dataset.repo_id` to alter the LeRobot dataset name. The dataset will be saved under `/home/$USER/.cache/huggingface/lerobot/`. - -The command initiates the Rerun viewer and teleoperation for both arms. Follow these steps for pick-and-place demonstration recording: - -* The recording starts immediately upon command execution for the current episode; be prepared or you'll need to re-record. -* Each episode's recording has three sequential states: - 1. **Demonstration recording** (60s) — Record the task. - 2. **Scene Reset** (60s) — Perform randomization, robot/object resets. Rerun displays signals, but no recording occurs. - 3. **Data Saving** (approx. 5s) — Saves recording to a LeRobot dataset. Rerun temporarily freezes; no recording occurs. -* Right Arrow (→) — skips to the next state. Cannot skip State 3 (saving stage); pressing it then could corrupt the episode. -* Left Arrow (←) (during State 1) — cancels the current recording, giving 60 seconds to reset the scene before recording restarts. Use this if you mess up. -* **ESC** — stops recording and saves all currently recorded content. Use after a completed successful episode to avoid including unwanted "garbage" data. -* Collecting multiple small, separate LeRobot datasets might be easier, and they can be combined for GR00T training later. - -## Step 3. Prepare Datasets for Training - -After creating the datasets, copy the `modality.json` file generated during synthetic data creation (e.g., `/home/$USER/.cache/huggingface/lerobot/spark/scrub-nurse-sim/meta/modality.json`) to each dataset's `meta` folder. This file is essential for GR00T model training. - -Collecting 20 real-world episodes should be sufficient for this tutorial. - -## Part 4: GR00T N1.5 Fine-Tuning - -## Step 1. Launch Docker Container - -Run the following command on DGX Spark to start a docker container: - -```shell -docker run -it --gpus all --privileged --rm \ - --ipc=host \ - --network=host \ - --ulimit memlock=-1 \ - --ulimit stack=67108864 \ - --entrypoint=bash \ - -e "NVIDIA_VISIBLE_DEVICES=all" \ - -e "PYTHONPATH=/workflows/so_arm_starter/scripts"\ - -v /dev:/dev \ - -v /home/"$USER"/.cache/huggingface/lerobot:/root/.cache/huggingface/lerobot \ - -v $(pwd):/workspace \ - -w /workspace \ -soarm-dgx -``` - -We mount `/home/"$USER"/.cache/huggingface/lerobot` to the container so previous calibration files and datasets are accessible. - -## Step 2. Download Pretrained Model - -Download our pretrained GR00T N1.5 model [here](https://github.com/isaac-for-healthcare/i4h-workflows/blob/main/workflows/so_arm_starter/README.md#-running-workflows). The model was trained on 70 simulated and 5 real episodes. This model will likely require fine-tuning due to variations in your robot hardware, calibration, and task setup. - -## Step 3. Run GR00T N1.5 Fine-Tuning - -Run the following command to run GR00T N1.5 fine-tuning: - -```shell -PYTHONWARNINGS="ignore::UserWarning" python -m training.gr00t_n1_5.train \ ---dataset_path ... \ ---output_dir /workspace/training-output/ \ ---data_config so100_dualcam \ ---base-model-path \ ---max-steps 30000 \ ---save-steps 2000 -``` - -Change `--base-model-path` to the pretrained model path. Experiment with `--max-steps` and `--save-steps`; we found 30,000 steps typically sufficient for convergence. On DGX Spark, 30,000 steps should take around 24 hours. - -You can use Tensorboard to monitor the training progress. - -## Part 5: Deploying Trained Robotic Policy - -## Step 1. Convert Model to TensorRT Format - -To get the optimal inference performance, let's convert the fine-tuned GR00T N1.5 model to [TensorRT](https://developer.nvidia.com/tensorrt) format. - -Open a terminal window and create the same docker container as in Part 4. Then, run the following commands: - -```shell -python -m policy_runner.gr00tn1_5.trt.export_onnx --ckpt_path -bash /workflows/so_arm_starter/scripts/policy_runner/gr00tn1_5/trt/build_engine.sh -``` - -This generates a `gr00t_engine` folder that contains the converted TensorRT model. Avoid running heavy compute or graphics tasks on DGX Spark during conversion. - -## Step 2. Deploy in Isaac Sim - -To deploy the trained policy model in Isaac Sim, an [RTI DDS](https://www.rti.com/products/dds-standard) license file is required for communication of different modules. Get a professional or evaluation license from [here](https://www.rti.com/get-connext). - -Open a new terminal window and create the same docker container as in Part 4. First, set the `RTI_LICENSE_FILE` environment variable: - -```shell -export RTI_LICENSE_FILE= -``` - -Then, run the following command: - -```shell -python -m policy_runner.run_policy \ ---ckpt_path= \ ---task_description="Grip the scissors and put them into the tray." \ ---trt \ ---trt_engine_path= -``` - -This loads the GR00T model for inference in the background. - -Open another terminal window. Activate the `so_arm_starter` conda environment and set `PYTHONPATH` and `RTI_LICENSE_FILE`: - -```shell -conda activate so_arm_starter -export PYTHONPATH=/workflows/so_arm_starter/scripts -export RTI_LICENSE_FILE= -``` - -Then, run the following command in the terminal: - -```shell -python -m simulation.environments.sim_with_dds --enable_cameras -``` - -Isaac Sim will open up and load the pick-and-place scene, then the simulated robot will execute the task autonomously, driven by the GR00T N1.5 policy model. - -## Step 3. Deploy in Real World - -Ensure the follower arm, wrist camera, and room camera are connected to DGX Spark. - -Launch the same docker container as in Part 4. Find and modify the configuration file under `/workflows/so_arm_starter/scripts/holoscan_apps/soarm_robot_config.yaml` to update the follower arm's device ID, name, camera indices, and the fine-tuned GR00T model path. Then, run the following command: - -```shell -python -m holoscan_apps.gr00t_inference_app \ ---config /workflows/so_arm_starter/scripts/holoscan_apps/soarm_robot_config.yaml -``` - -This command launches an efficient GR00T N1.5 inference application using [NVIDIA Holoscan SDK](https://github.com/nvidia-holoscan/holoscan-sdk). The follower arm will execute the task autonomously shortly after. - -## Conclusion - -This tutorial demonstrated the end-to-end workflow of developing and deploying an autonomous healthcare robot on a single **NVIDIA DGX Spark**. Leveraging **NVIDIA Isaac For Healthcare**, we consolidated the 3-computers workflow of synthetic data generation, GR00T N1.5 training, and robotic policy deployment onto one powerful hardware platform. This workflow highlights the efficiency of the DGX Spark for accelerating the physical AI development pipeline, making the creation and deployment of intelligent healthcare robots more streamlined and accessible.