Skip to content

Commit af62c4f

Browse files
youkaichaoanko-intel
authored andcommitted
[misc] do not read HOST_IP (vllm-project#10644)
Signed-off-by: youkaichao <youkaichao@gmail.com>
1 parent 827b50e commit af62c4f

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

vllm/envs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def get_default_config_root():
153153
# If you are using multi-node inference, you should set this differently
154154
# on each node.
155155
'VLLM_HOST_IP':
156-
lambda: os.getenv('VLLM_HOST_IP', "") or os.getenv("HOST_IP", ""),
156+
lambda: os.getenv('VLLM_HOST_IP', ""),
157157

158158
# used in distributed environment to manually set the communication port
159159
# Note: if VLLM_PORT is set, and some code asks for multiple ports, the

vllm/executor/ray_gpu_executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def sort_by_driver_then_worker_ip(worker):
216216
f"Every node should have a unique IP address. Got {n_nodes}"
217217
f" nodes with node ids {list(node_workers.keys())} and "
218218
f"{n_ips} unique IP addresses {all_ips}. Please check your"
219-
" network configuration. If you set `VLLM_HOST_IP` or "
220-
"`HOST_IP` environment variable, make sure it is unique for"
219+
" network configuration. If you set `VLLM_HOST_IP`"
220+
" environment variable, make sure it is unique for"
221221
" each node.")
222222

223223
VLLM_INSTANCE_ID = get_vllm_instance_id()

vllm/executor/ray_hpu_executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ def sort_by_driver_then_worker_ip(worker):
196196
f"Every node should have a unique IP address. Got {n_nodes}"
197197
f" nodes with node ids {list(node_workers.keys())} and "
198198
f"{n_ips} unique IP addresses {all_ips}. Please check your"
199-
" network configuration. If you set `VLLM_HOST_IP` or "
200-
"`HOST_IP` environment variable, make sure it is unique for"
199+
" network configuration. If you set `VLLM_HOST_IP` "
200+
"environment variable, make sure it is unique for"
201201
" each node.")
202202

203203
VLLM_INSTANCE_ID = get_vllm_instance_id()

vllm/utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@ async def collect_from_async_generator(
485485

486486
def get_ip() -> str:
487487
host_ip = envs.VLLM_HOST_IP
488+
if "HOST_IP" in os.environ and "VLLM_HOST_IP" not in os.environ:
489+
logger.warning(
490+
"The environment variable HOST_IP is deprecated and ignored, as"
491+
" it is often used by Docker and other software to"
492+
"interact with the container's network stack. Please"
493+
"use VLLM_HOST_IP instead to set the IP address for vLLM processes"
494+
" to communicate with each other.")
488495
if host_ip:
489496
return host_ip
490497

0 commit comments

Comments
 (0)