-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Enhance run_cluster.sh for multi-NIC support #28328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added support for multi-NIC configurations by parsing VLLM_HOST_IP from additional arguments. Built Ray IP environment variables to ensure correct network interface binding. Signed-off-by: Ev Lacey <elacey@nvidia.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
|
Documentation preview: https://vllm--28328.org.readthedocs.build/en/28328/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request enhances run_cluster.sh to support multi-NIC configurations by allowing VLLM_HOST_IP to be specified. The core change involves parsing this IP from the command-line arguments. My review identifies a potential bug in the parsing logic which could lead to incorrect behavior if arguments are passed in an unexpected order. I've provided a more robust implementation to address this.
| VLLM_HOST_IP="" | ||
| for arg in "${ADDITIONAL_ARGS[@]}"; do | ||
| if [[ $arg == "-e" ]]; then | ||
| continue | ||
| fi | ||
| if [[ $arg == VLLM_HOST_IP=* ]]; then | ||
| VLLM_HOST_IP="${arg#VLLM_HOST_IP=}" | ||
| break | ||
| fi | ||
| done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current logic for parsing VLLM_HOST_IP is not robust. It will find and use a VLLM_HOST_IP=... argument even if it is not preceded by a -e flag, which is required for passing environment variables to docker run. This could lead to misinterpreting arguments intended for the command inside the container. The parsing should be stricter to only identify VLLM_HOST_IP when it's explicitly passed as an environment variable.
| VLLM_HOST_IP="" | |
| for arg in "${ADDITIONAL_ARGS[@]}"; do | |
| if [[ $arg == "-e" ]]; then | |
| continue | |
| fi | |
| if [[ $arg == VLLM_HOST_IP=* ]]; then | |
| VLLM_HOST_IP="${arg#VLLM_HOST_IP=}" | |
| break | |
| fi | |
| done | |
| VLLM_HOST_IP="" | |
| prev_arg="" | |
| for arg in "${ADDITIONAL_ARGS[@]}"; do | |
| if [[ "${prev_arg}" == "-e" ]] && [[ "${arg}" == VLLM_HOST_IP=* ]]; then | |
| VLLM_HOST_IP="${arg#VLLM_HOST_IP=}" | |
| break | |
| fi | |
| prev_arg="${arg}" | |
| done |
Signed-off-by: Ev Lacey <elacey@nvidia.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: Ev Lacey <elacey@nvidia.com>
Purpose
Added support for multi-NIC configurations by parsing VLLM_HOST_IP from additional arguments. Built Ray IP environment variables to ensure correct network interface binding.
Test Plan
Run on device with multiple interfaces (such as DGX Spark) . The desired behavior is that the IP address of the NICs can be specified (previously they default to the IP of the host)
bash run_cluster.sh $VLLM_IMAGE 192.168.100.10 --head ~/.cache/huggingface
-e VLLM_HOST_IP=192.168.100.10
-e UCX_NET_DEVICES=$MN_IF_NAME
-e NCCL_SOCKET_IFNAME=$MN_IF_NAME
-e OMPI_MCA_btl_tcp_if_include=$MN_IF_NAME
-e GLOO_SOCKET_IFNAME=$MN_IF_NAME
-e TP_SOCKET_IFNAME=$MN_IF_NAME
-e RAY_memory_monitor_refresh_ms=0
-e MASTER_ADDR=192.168.100.10
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.