fix nixl side-channel host selection (#41806)
Signed-off-by: Shahar Mor <smor@nvidia.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
5cba6839e6
commit
f9f770ca0b
@@ -2005,6 +2005,8 @@ class EngineCoreActorMixin:
|
||||
vllm_config.parallel_config.data_parallel_index = dp_rank
|
||||
vllm_config.parallel_config.data_parallel_rank_local = local_dp_rank
|
||||
|
||||
self._set_nixl_side_channel_host()
|
||||
|
||||
# Set CUDA_VISIBLE_DEVICES as early as possible in actor life cycle
|
||||
# NOTE: in MP we set CUDA_VISIBLE_DEVICES at process creation time,
|
||||
# and this cannot be done in the same way for Ray because:
|
||||
@@ -2024,6 +2026,16 @@ class EngineCoreActorMixin:
|
||||
# of ray.
|
||||
self._set_visible_devices(vllm_config, local_dp_rank)
|
||||
|
||||
@staticmethod
|
||||
def _set_nixl_side_channel_host():
|
||||
import ray
|
||||
|
||||
# The driver-side value is excluded from Ray actor env propagation.
|
||||
# Fill in an actor-local default while preserving explicit overrides.
|
||||
os.environ.setdefault(
|
||||
"VLLM_NIXL_SIDE_CHANNEL_HOST", ray.util.get_node_ip_address()
|
||||
)
|
||||
|
||||
def _set_visible_devices(self, vllm_config: VllmConfig, local_dp_rank: int):
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ from vllm.utils.network_utils import get_open_zmq_ipc_path, zmq_socket_ctx
|
||||
from vllm.utils.system_utils import get_mp_context
|
||||
from vllm.v1.engine.coordinator import DPCoordinator
|
||||
from vllm.v1.executor import Executor
|
||||
from vllm.v1.executor.ray_utils import WORKER_SPECIFIC_ENV_VARS
|
||||
from vllm.v1.utils import get_engine_client_zmq_addr, shutdown
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -356,7 +357,10 @@ class CoreEngineActorManager:
|
||||
self.local_engine_actors: list[ray.ActorHandle] = []
|
||||
self.remote_engine_actors: list[ray.ActorHandle] = []
|
||||
|
||||
env_vars_list = get_env_vars_to_copy(destination=actor_class.__name__)
|
||||
env_vars_list = get_env_vars_to_copy(
|
||||
destination=actor_class.__name__,
|
||||
exclude_vars=WORKER_SPECIFIC_ENV_VARS,
|
||||
)
|
||||
self.env_vars_dict = {
|
||||
name: os.environ[name] for name in env_vars_list if name in os.environ
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user