Skip to content

feat(vllm): auto-prepare trusted dual DGX Stations#7030

Open
ericksoa wants to merge 77 commits into
mainfrom
feat/dual-dgx-station-inference
Open

feat(vllm): auto-prepare trusted dual DGX Stations#7030
ericksoa wants to merge 77 commits into
mainfrom
feat/dual-dgx-station-inference

Conversation

@ericksoa

@ericksoa ericksoa commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR makes the existing dual-DGX Station Nemotron 3 Ultra path automatic after the operator-owned physical/network recipe and SSH trust are already in place. A single NemoClaw installer run on one DGX Station GB300 derives the direct /30 counterparts, selects one unambiguous pretrusted reciprocal peer, prepares both hosts, resumes safely across manual reboots, and hands the qualified pair to the managed vLLM deployment flow.

The managed runtime now follows NVIDIA's current dual-Station NemoClaw playbook: vLLM v0.25.1-aarch64, Ray 2.56.0, tensor parallelism 1, pipeline parallelism 2, a 262,144-token maximum model length, FP8 KV cache, prefix caching, and the served alias nemotron-ultra.

DGX Station remains Deferred. This PR does not automate rail configuration, firmware, SSH trust enrollment, or reboots, and it does not claim physical-hardware acceptance.

Changes

  • Discover only the mathematical counterpart on each of exactly two active private /30, 400 Gb/s, MTU-9000 CX-8 rails. There is no subnet scan, ssh-keyscan, mDNS, Avahi, LLDP, ARP sweep, or trust enrollment.
  • Require at least one derived address to be pretrusted before contact. Verify reciprocal rail addresses/MACs, routes, neighbors, jumbo reachability, GB300 identity, and distinct GPU UUIDs.
  • Keep explicit NEMOCLAW_DGX_STATION_PEER and NEMOCLAW_VLLM_MODEL selections authoritative and fail closed on conflicting selections.
  • Reuse scripts/prepare-dgx-station-host.sh as the sole host-preparation implementation, with exact-byte hashing and strict noninteractive SSH execution.
  • Preserve exit-10/manual-reboot behavior with owner-only, symlink-safe state bound to the exact revision, helper digest, host-key identity, GPU UUIDs, and reciprocal rail identity.
  • Pin the dual runtime to vllm/vllm-openai@sha256:2cc49b81319f7a66a33dd8bd63a7bfddae079122b33ce51989b6828a1f038c37 while leaving the single-Station Ultra runtime unchanged.
  • Bootstrap Ray 2.56.0 into the container's private writable home, start the head on the selected RoCE address at TCP 6379, wait transactionally for the worker GPU, and launch one authenticated vLLM API with PP=2/TP=1.
  • Apply the playbook's long-context, timeout, FP8 KV-cache, prefix-caching, NCCL RoCE, GDR, QPS, and UCX settings while retaining NemoClaw's immutable image/revision, non-root read-only container, direct-rail bind, bearer authentication, lifecycle ownership, and rollback controls.
  • Update installer routing, model identity/staging, lifecycle migration, focused behavioral coverage, and DGX Station documentation for the new runtime contract.

Blockers before marking ready

  • Complete sensitive-path maintainer review for installer mutation, strict SSH, resume state, credentials, networking, Ray control-plane exposure, and lifecycle ownership.
  • Run full physical two-Station acceptance: fresh preparation on both hosts, required reboot/resume, both rails, Ray membership, model staging and full load, authenticated sandbox chat and tool calls, restart/reboot reuse, and injected one-sided failure/rollback.
  • Record the authenticated OpenShell route smoke and confirm unauthenticated access is rejected without exposing the managed bearer credential.

Type of Change

  • Code change with doc updates
  • Doc only

Quality Gates

  • Tests added or updated for changed behavior
  • Docs updated for user-facing behavior changes
  • Sensitive paths changed
  • Sensitive-path review completed or maintainer-approved waiver recorded

Verification

Exact pushed head: 85371981fc9c5dac7d42ba93587a707141104712

  • Branch refresh commits are signed and contain DCO sign-off
  • Pre-commit, commit-msg, and pre-push hooks passed
  • Focused CLI suites: 7 files, 265 tests passed
  • Merge-resolution and documentation suites: 5 files, 100 tests passed
  • Installer integration suites: 3 files, 178 passed and 1 skipped
  • CLI TypeScript check passed
  • Docs generation, route checks, and Fern validation passed with 0 errors and 2 existing warnings
  • Installer release-asset hashes are current
  • No secrets, API keys, or credentials committed
  • Exact-head GitHub CI and review gates complete

Signed-off-by: Aaron Erickson aerickson@nvidia.com

ericksoa and others added 15 commits July 15, 2026 20:50
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Senthil Kumar Ravichandran <senthilr@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds DGX Station dual-peer qualification, secure SSH and resume state, managed two-node vLLM lifecycle orchestration, onboarding integration, updated documentation, and a guarded fixture-backed simulator with extensive tests.

Changes

Dual-Station installer and preparation

Layer / File(s) Summary
Peer qualification and resume flow
scripts/install.sh, scripts/lib/dgx-station-peer.mts, scripts/prepare-dual-dgx-station.mts, scripts/prepare-dgx-station-host.sh
Discovers reciprocal trusted Station peers, validates rails and connectivity, persists revision-bound resume state, supports reboot-required status 10, and runs host preparation in explicit modes.
Managed vLLM runtime
src/lib/inference/vllm-station-cluster.ts, src/lib/inference/vllm-station-cluster-lifecycle.ts, src/lib/inference/vllm-station-model-staging.ts, src/lib/inference/vllm.ts
Builds validated dual-node plans, stages pinned model snapshots, performs GPU/runtime preflight, starts worker/head containers, verifies readiness and authentication, and rolls back exact owned resources.
SSH binding and Docker transport
src/lib/inference/vllm-station-ssh-binding.ts, src/lib/inference/vllm-docker-env.ts, src/lib/inference/vllm-api-key.ts
Persists immutable host-key bindings, validates filesystem metadata, creates sanitized local/remote Docker environments, and manages a protected shared API key.
Inference and onboarding integration
src/lib/inference/local.ts, src/lib/inference/context-window.ts, src/lib/onboard/*, src/lib/inference/vllm-models.ts
Routes local vLLM probing through managed endpoints when available, passes explicit managed credentials to validation, and adds the pinned distributed Nemotron command and gated-model handling.
Simulation and tests
scripts/simulate-dual-station.mts, src/lib/inference/*simulator*, test/install-station-pair-preparation.test.ts, vitest.config.ts
Adds a restricted simulator command, in-memory dual-Station lifecycle fixtures, installer project routing, and regression coverage for qualification, lifecycle, authentication, and resume behavior.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5927 — Shares the inference-selection validation boundary and its dependency-injection changes.
  • NVIDIA/NemoClaw#6883 — Overlaps the DGX Station express-install and Nemotron model-selection logic.
  • NVIDIA/NemoClaw#6991 — Extends the same Station host-preparation and controller-binding workflow.

Suggested labels: area: ci, area: e2e, area: install

Suggested reviewers: cv, sandl99, hoyalim

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: automatic preparation for trusted dual DGX Stations.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dual-dgx-station-inference

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit abc34e4 in the feat/dual-dgx-statio... branch remains at 96%, unchanged from commit 1d418f5 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit abc34e4 in the feat/dual-dgx-statio... branch remains at 80%, unchanged from commit 1d418f5 in the main branch.

Show a code coverage summary of the most impacted files.
File main 1d418f5 feat/dual-dgx-statio... abc34e4 +/-
src/lib/state/m...-acquisition.ts 84% 75% -9%
src/lib/shields/index.ts 72% 71% -1%
src/lib/onboard...-desktop-gpu.ts 77% 89% +12%
src/lib/inferen...odel-staging.ts 0% 65% +65%
src/lib/inferen...er-lifecycle.ts 0% 75% +75%
src/lib/inferen...fecycle-lock.ts 0% 78% +78%
src/lib/inferen...vllm-api-key.ts 0% 79% +79%
src/lib/inferen...tion-cluster.ts 0% 83% +83%
src/lib/inferen...-ssh-binding.ts 0% 87% +87%
src/lib/inferen...test-support.ts 0% 100% +100%

Updated July 22, 2026 19:24 UTC

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed after a partial review · low confidence · 0 blockers · 2 warnings · 1 suggestion

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, security-posture, inference-routing, network-policy, onboard-repair, onboard-resume

1 optional E2E recommendation
  • vllm-docker-storage

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Comment thread src/lib/inference/vllm-api-key.ts Fixed
Comment thread src/lib/inference/vllm-station-cluster-lifecycle.ts Fixed
Comment thread src/lib/inference/vllm-station-cluster-lifecycle.ts Fixed
@ericksoa ericksoa added the feature PR adds or expands user-visible functionality label Jul 16, 2026
@ericksoa ericksoa self-assigned this Jul 16, 2026
@ericksoa ericksoa added platform: dgx-station Affects DGX Station hardware or workflows provider: vllm vLLM local or hosted provider behavior area: inference Inference routing, serving, model selection, or outputs area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow labels Jul 16, 2026
senthilr-nv and others added 4 commits July 16, 2026 11:22
Signed-off-by: Senthil Kumar Ravichandran <senthilr@nvidia.com>
…st-prereqs

Signed-off-by: Senthil Kumar Ravichandran <senthilr@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit 586a60d)
Copilot AI review requested due to automatic review settings July 21, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

ericksoa added 4 commits July 21, 2026 15:25
# Conflicts:
#	docs/get-started/dgx-station-preparation.mdx
#	docs/get-started/quickstart.mdx
#	docs/reference/commands.mdx
#	docs/resources/starter-prompt.md
#	test/starter-prompt-docs.test.ts
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Copilot AI review requested due to automatic review settings July 21, 2026 23:01
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 66 out of 66 changed files in this pull request and generated 3 comments.

Comment on lines 2487 to 2490
require_command apt-cache
require_command apt-get
require_command cmp
require_command curl
require_command dpkg
Comment on lines 568 to 571
if (vllmRunning) {
const message =
`vLLM is already running on localhost:${String(deps.vllmPort)}. ` +
"vLLM is already running on the managed endpoint. " +
"Select Local vLLM, or stop the existing server before selecting the managed install path.";
Comment on lines +98 to +106
const filePath = dualStationVllmApiKeyPath(stateDir);
const noFollow = fs.constants.O_NOFOLLOW ?? 0;
let fd: number | undefined;
try {
fd = fs.openSync(
filePath,
fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | noFollow,
0o600,
);
Copilot AI review requested due to automatic review settings July 21, 2026 23:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 67 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

src/lib/onboard/setup-nim-flow.ts:571

  • The message for vllmRunning now claims "managed endpoint", but vllmRunning comes from generic host-state probing and can represent any already-running vLLM. This can mislead users on non-managed setups; keep the wording topology-neutral.
    scripts/prepare-dgx-station-host.sh:2490
  • verify_apply_state now calls verify_dual_station_controller_uid_binding, which uses cmp, but run_apply no longer requires cmp. On minimal environments this can fail mid-run with a missing-command error; keep cmp in the --apply prerequisite list.
  require_command apt-cache
  require_command apt-get
  require_command curl
  require_command dpkg

Comment on lines +249 to +251
const apiKey = managedBinding?.apiKey ?? null;
const managedDualEndpoint = managedBinding !== null;
console.log(
Comment thread src/lib/onboard.ts
Comment on lines 1088 to 1093
const handleVllmSelection = createSetupNimVllmHandler({
VLLM_PORT, runCapture, getLocalProviderBaseUrl, getLocalProviderValidationBaseUrl,
isSafeModelId, requireValue, validateOpenAiLikeSelection,
getManagedVllmProviderBinding: localInference.getManagedDualStationVllmProviderBinding, queryVllmModels: (baseUrl, apiKey) => { const result = localInference.probeVllmModels(baseUrl, apiKey); return result.ok ? result.body : ""; }, isSafeModelId, requireValue, validateOpenAiLikeSelection,
applyVllmRuntimeContextWindow: localInference.applyVllmRuntimeContextWindow, isDgxSparkHost: () => nim.detectNvidiaPlatform() === "spark", isNemoClawManagedVllmRunning,
exitProcess: (code) => process.exit(code),
});
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Copilot AI review requested due to automatic review settings July 21, 2026 23:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 67 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/lib/inference/vllm-api-key.ts:99

  • ensureDualStationVllmApiKey() falls back to 0 when fs.constants.O_NOFOLLOW is unavailable. That silently disables the no-symlink guarantee, allowing the key write to follow a symlink on platforms lacking O_NOFOLLOW support. The corresponding read path fails closed when O_NOFOLLOW is missing; the write path should do the same for consistency and to avoid a downgrade in protection.
  const noFollow = fs.constants.O_NOFOLLOW ?? 0;

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Copilot AI review requested due to automatic review settings July 21, 2026 23:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 68 out of 68 changed files in this pull request and generated 3 comments.

Comment on lines 118 to +126
function probeVllmRunning(runCapture: RunCapture): boolean {
return !!runCapture(
["curl", "-sf", ...LOCAL_PROVIDER_PROBE_CURL_ARGS, `http://127.0.0.1:${VLLM_PORT}/v1/models`],
{ ignoreError: true },
);
const endpoint = getLocalProviderAvailabilityEndpoint("vllm-local");
if (!endpoint) return false;
const writeOut = endpoint.endsWith("/health")
? ["--noproxy", "*", "--write-out", "%{http_code}"]
: [];
return !!runCapture(["curl", "-sf", ...LOCAL_PROVIDER_PROBE_CURL_ARGS, ...writeOut, endpoint], {
ignoreError: true,
});
Comment on lines 959 to 963
case "vllm-local":
return {
ok: false,
message: `Local vLLM was selected, but nothing is responding on http://127.0.0.1:${VLLM_PORT}.`,
message: `Local vLLM was selected, but nothing is responding on ${getLocalProviderHealthEndpoint(provider) ?? "the configured endpoint"}.`,
};
Comment on lines 994 to 998
case "vllm-local":
return {
ok: false,
message: `Local vLLM is responding on 127.0.0.1, but the Docker container reachability check failed for http://host.openshell.internal:${VLLM_PORT}. This may be a Docker networking issue — the sandbox uses a different network path and may still work.`,
message: `Local vLLM is responding on the host, but the Docker container reachability check failed for ${getContainerCheckUrl(provider)}. This may be a Docker networking issue — the sandbox uses a different network path and may still work.`,
diagnostic,
Copilot AI review requested due to automatic review settings July 22, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@senthilr-nv senthilr-nv added v0.0.97 Release target and removed v0.0.94 labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow feature PR adds or expands user-visible functionality platform: dgx-station Affects DGX Station hardware or workflows provider: vllm vLLM local or hosted provider behavior v0.0.97 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants