mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 19:39:40 +08:00
Add ability to specify worker and driver ports (#7833)
This commit is contained in:
@@ -1223,6 +1223,8 @@ def start_raylet(redis_address,
|
||||
temp_dir,
|
||||
session_dir,
|
||||
resource_spec,
|
||||
min_worker_port=None,
|
||||
max_worker_port=None,
|
||||
object_manager_port=None,
|
||||
redis_password=None,
|
||||
use_valgrind=False,
|
||||
@@ -1251,6 +1253,10 @@ def start_raylet(redis_address,
|
||||
resource_spec (ResourceSpec): Resources for this raylet.
|
||||
object_manager_port: The port to use for the object manager. If this is
|
||||
None, then the object manager will choose its own port.
|
||||
min_worker_port (int): The lowest port number that workers will bind
|
||||
on. If not set, random ports will be chosen.
|
||||
max_worker_port (int): The highest port number that workers will bind
|
||||
on. If set, min_worker_port must also be set.
|
||||
redis_password: The password to use when connecting to Redis.
|
||||
use_valgrind (bool): True if the raylet should be started inside
|
||||
of valgrind. If this is True, use_profiler must be False.
|
||||
@@ -1328,6 +1334,12 @@ def start_raylet(redis_address,
|
||||
if object_manager_port is None:
|
||||
object_manager_port = 0
|
||||
|
||||
if min_worker_port is None:
|
||||
min_worker_port = 0
|
||||
|
||||
if max_worker_port is None:
|
||||
max_worker_port = 0
|
||||
|
||||
if load_code_from_local:
|
||||
start_worker_command += ["--load-code-from-local"]
|
||||
|
||||
@@ -1336,6 +1348,8 @@ def start_raylet(redis_address,
|
||||
"--raylet_socket_name={}".format(raylet_name),
|
||||
"--store_socket_name={}".format(plasma_store_name),
|
||||
"--object_manager_port={}".format(object_manager_port),
|
||||
"--min_worker_port={}".format(min_worker_port),
|
||||
"--max_worker_port={}".format(max_worker_port),
|
||||
"--node_manager_port={}".format(node_manager_port),
|
||||
"--node_ip_address={}".format(node_ip_address),
|
||||
"--redis_address={}".format(gcs_ip_address),
|
||||
|
||||
Reference in New Issue
Block a user