Skip to content

Add Ray Serve gateway for multi-instance vLLM spanning multiple nodes per instance - #3168

Closed
oyilmaz-nvidia wants to merge 9 commits into
mainfrom
onur/ray-service-multi-node
Closed

oyilmaz-nvidia wants to merge 9 commits into
mainfrom
onur/ray-service-multi-node

Conversation

@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Ray Serve–based gateway (nemo_gym/orchestration/ray_serve_gateway.py) that manages both instance creation and request routing for multi-instance vLLM deployments in gym eval submit, replacing vLLM's own --data-parallel-size/multi-node DP mechanism for topologies it can't express.
  • Lifts the previous restriction that forbade an individual vLLM instance's own tensor/pipeline-parallel footprint from spanning multiple Slurm nodes when number_of_instances > 1 — each instance now gets its own vllm serve --distributed-executor-backend ray process, explicitly pinned to a distinct slice of nodes via Ray actor node-affinity, so instances can themselves span nodes (e.g. TP8×PP2 across 2 nodes/instance, 2 instances, 4 nodes total).
  • Selection is automatic: the gateway kicks in whenever the topology requires it (an instance's footprint exceeds one node's GPU count), or opt-in via a new use_ray_serve: true field on VllmServiceConfig for topologies that would otherwise work fine with vLLM's own DP.
  • Fetches the gateway script from driver.gym_install's repo/ref directly into the vLLM service's own container (git clone + run as a standalone script — no nemo_gym package install there, to avoid clobbering vLLM's pinned torch/ray), auto-installing git if the image doesn't bundle it.
  • Verified end-to-end on the real cluster: both a single-node-per-instance topology and the target TP8×PP2/2-instance/4-node topology start cleanly and reach full vLLM readiness with zero errors.

Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33 yaoyu-33 added area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 8, 2026
Comment on lines +107 to +112
return (
f"{subject} requires the Ray Serve gateway (use_ray_serve or an instance spanning multiple "
"nodes), but driver.gym_install is not set. The gateway script "
"(nemo_gym/orchestration/ray_serve_gateway.py) is fetched from that repo/ref into the vLLM "
"service's own container - set driver.gym_install.{repo,ref}."
)

@prokotg prokotg Sep 9, 2026

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.

That should not be required. Orchestration (including how we route between instances) should be strictly self-contained. I also suppose a case where users will use container without a gym install might be common

@yaoyu-33 yaoyu-33 added waiting-on-customer Waiting on the original author to respond and removed needs-review PR is ready for code review and waiting on a reviewer labels Sep 10, 2026
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor Author

Closing this in favor of this PR #3214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work waiting-on-customer Waiting on the original author to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants