@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6e9ff050c8
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 05:45 UTC

[misc] do not read HOST_IP (#10644)

Signed-off-by: youkaichao <youkaichao@gmail.com>

youkaichao committed Nov 25, 2024 at 17:04 UTC 6e9ff050c8e83ad6d5e5eab621e83549e35933a1
4 files changed +12 -5
vllm/envs.py
+1 -1
@@ -153,7 +153,7 @@ environment_variables: Dict[str, Callable[[], Any]] = {
153 # If you are using multi-node inference, you should set this differently
154 # on each node.
155 'VLLM_HOST_IP':
156 - lambda: os.getenv('VLLM_HOST_IP', "") or os.getenv("HOST_IP", ""),
156 + lambda: os.getenv('VLLM_HOST_IP', ""),
157
158 # used in distributed environment to manually set the communication port
159 # Note: if VLLM_PORT is set, and some code asks for multiple ports, the
vllm/executor/ray_gpu_executor.py
+2 -2
@@ -216,8 +216,8 @@ class RayGPUExecutor(DistributedGPUExecutor):
216 f"Every node should have a unique IP address. Got {n_nodes}"
217 f" nodes with node ids {list(node_workers.keys())} and "
218 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"
221 " each node.")
222
223 VLLM_INSTANCE_ID = get_vllm_instance_id()
vllm/executor/ray_hpu_executor.py
+2 -2
@@ -192,8 +192,8 @@ class RayHPUExecutor(DistributedGPUExecutor):
192 f"Every node should have a unique IP address. Got {n_nodes}"
193 f" nodes with node ids {list(node_workers.keys())} and "
194 f"{n_ips} unique IP addresses {all_ips}. Please check your"
195 - " network configuration. If you set `VLLM_HOST_IP` or "
196 - "`HOST_IP` environment variable, make sure it is unique for"
195 + " network configuration. If you set `VLLM_HOST_IP` "
196 + "environment variable, make sure it is unique for"
197 " each node.")
198
199 VLLM_INSTANCE_ID = get_vllm_instance_id()
vllm/utils.py
+7
@@ -467,6 +467,13 @@ async def collect_from_async_generator(
467
468 def get_ip() -> str:
469 host_ip = envs.VLLM_HOST_IP
470 + if "HOST_IP" in os.environ and "VLLM_HOST_IP" not in os.environ:
471 + logger.warning(
472 + "The environment variable HOST_IP is deprecated and ignored, as"
473 + " it is often used by Docker and other software to"
474 + "interact with the container's network stack. Please"
475 + "use VLLM_HOST_IP instead to set the IP address for vLLM processes"
476 + " to communicate with each other.")
477 if host_ip:
478 return host_ip
479