Skip to content

Inference server: first-class off-board GPU compute on the gaming PC#53

Open
MJohnson459 wants to merge 1 commit into
mainfrom
inference-server-role
Open

Inference server: first-class off-board GPU compute on the gaming PC#53
MJohnson459 wants to merge 1 commit into
mainfrom
inference-server-role

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Inference server role: dedicated NVIDIA/Windows off-board compute.

Promotes the ad-hoc off-board inference pattern into a first-class inference-server role on a dedicated Windows gaming PC (NVIDIA GPU), serving depth + detection now and future services as they land, with graceful robot degradation when the server is absent.

HOST DECISION (docs/inference-server.md): native Windows, not WSL2 — the win-64 CUDA torch wheel solves cleanly in pixi (verified torch-2.11.0+cu128 win_amd64 in pixi.lock), native bind puts the socket straight on the LAN (no WSL NAT/portproxy), and Task Scheduler gives boot auto-start with no VM layer.

CHANGES:

  • pixi: new inference-cuda env (feature platforms=[win-64], torch from cu128 wheel index) as an isolated own-solve sibling of inference/inference-rocm; verified per-env platform isolation leaves the aarch64 robot solve byte-identical. Tasks: inference-cuda, depth/detect-server-cuda, inference-prefetch[-cuda|-rocm], and robot-side inference-health/inference-bench.
  • Health/version endpoint: HEALTH_MAGIC request in the shared wire protocol + WireClient.health(); servers reply a JSON status blob. tools/inference_health.py probes it from the robot (torch-free).
  • tools/inference_server.py: cross-platform supervisor replacing the bash launcher (no bash on Windows); its SERVICES list is the multi-service seam — a new tenant is one row, inheriting binding/supervision/health/reconnect.
  • detect_server: --device auto|cpu|cuda so OWLv2 runs on the GPU too (tenant The camera doesn't fit when the SO-101 arm is attached #2).
  • Windows deploy scripts (mote_perception/deploy/windows): setup.ps1, install/uninstall_service.ps1 (boot Scheduled Task), run_inference.ps1 (self-restarting runner + dated logs).
  • Measurement: tools/inference_bench.py (round-trip latency/fps -> committed JSON) + benchmarks/README.md with #152 CPU/ROCm baselines and a CUDA template.
  • Fallback verified/documented: server-absent = warn-and-skip (topic goes quiet, publisher stays alive, auto-reconnects); nav keeps running on lidar.
  • Docs: docs/inference-server.md (role, host decision, setup guide, prod behaviors, multi-service pattern, fallback matrix, measurement); mote_perception/README + CLAUDE updated.

VERIFIED repo-side: 17 wire tests pass incl. new health round-trip/interleave tests; ruff check+format clean; pre-commit hooks pass on commit; pixi.lock re-solves with per-env platform isolation intact; inference-health CLI tested end-to-end (UP + DOWN paths, exit codes).

HUMAN-IN-LOOP (per task): CUDA latency numbers, reboot/auto-start, and LAN e2e need Michael's session at the gaming PC following docs/inference-server.md.

Branch inference-server-role committed locally (not pushed per standing git rule); ready for voro pr.

…sk 173)

Productionize the ad-hoc off-board inference pattern into a first-class
"inference server" role on a dedicated Windows gaming PC with an NVIDIA GPU,
serving depth and detection today and future services as they land, with the
robot degrading gracefully when the server is absent.

Host decision (documented in docs/inference-server.md): native Windows, not
WSL2. The win-64 CUDA torch wheel solves cleanly in a pixi feature
(torch-2.11.0+cu128 win_amd64, verified in pixi.lock), native bind puts the
socket straight on the LAN with no WSL NAT/portproxy, and Task Scheduler gives
boot auto-start without a VM layer.

- pixi: new `inference-cuda` env (feature platforms = ["win-64"], torch from the
  pytorch.org cu128 wheel index) as an isolated own-solve sibling of
  `inference`/`inference-rocm` — verified it never perturbs the aarch64 robot or
  any other env's solve. Tasks: inference-cuda, depth/detect-server-cuda,
  inference-prefetch[-cuda|-rocm], plus robot-side inference-health/inference-bench.
- Health/version endpoint: HEALTH_MAGIC request in the shared wire protocol +
  WireClient.health(); servers reply with a JSON status blob (model, device, GPU,
  torch). tools/inference_health.py probes it from the robot (torch-free).
- Cross-platform supervisor tools/inference_server.py replaces the bash launcher
  (no bash on Windows); its SERVICES list is the multi-service seam — a new tenant
  is one row and inherits binding, supervision, health, and reconnect.
- detect_server gains --device auto|cpu|cuda so OWLv2 runs on the GPU too.
- Windows deploy scripts (mote_perception/deploy/windows): setup.ps1 (pixi + env +
  model prefetch + GPU check), install/uninstall_service.ps1 (boot Scheduled
  Task), run_inference.ps1 (self-restarting runner + dated logs).
- Measurement: tools/inference_bench.py (torch-free round-trip latency/fps ->
  committed JSON) and benchmarks/README.md with the #152 CPU/ROCm baselines and a
  template for the CUDA numbers Michael fills at the PC.
- Fallback verified/documented: server-absent = warn-and-skip (topic goes quiet,
  publisher stays alive, reconnects automatically); nav keeps running on lidar.
- Docs: docs/inference-server.md (role, host decision, setup guide, prod
  behaviors, multi-service pattern, fallback matrix, measurement); README + CLAUDE
  updated. New tests cover the health round-trip and interleaving with infer.

Verified repo-side: 17 wire tests pass (incl. new health tests), ruff
check/format clean, pixi.lock re-solves with per-env platform isolation intact.
On-PC steps (CUDA latency numbers, reboot/auto-start, LAN e2e) need Michael's
session at the gaming PC per the setup guide.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LLcxTNpEiB29frknCDug2V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant