mirror of
https://github.com/wassname/ray.git
synced 2026-07-12 03:51:53 +08:00
Integrate "tempfile_service" into "ray.node.Node" (#3953)
This commit is contained in:
committed by
Robert Nishihara
parent
dac1969647
commit
21472b890a
@@ -7,9 +7,10 @@ import traceback
|
||||
|
||||
import ray
|
||||
import ray.actor
|
||||
import ray.node
|
||||
import ray.ray_constants as ray_constants
|
||||
import ray.tempfile_services as tempfile_services
|
||||
import ray.utils
|
||||
from ray.parameter import RayParams
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description=("Parse addresses for the worker "
|
||||
@@ -70,9 +71,19 @@ if __name__ == "__main__":
|
||||
|
||||
ray.utils.setup_logger(args.logging_level, args.logging_format)
|
||||
|
||||
# Override the temporary directory.
|
||||
tempfile_services.set_temp_root(args.temp_dir)
|
||||
ray_params = RayParams(
|
||||
node_ip_address=args.node_ip_address,
|
||||
redis_address=args.redis_address,
|
||||
redis_password=args.redis_password,
|
||||
plasma_store_socket_name=args.object_store_name,
|
||||
raylet_socket_name=args.raylet_name,
|
||||
temp_dir=args.temp_dir)
|
||||
|
||||
node = ray.node.Node(
|
||||
ray_params, head=False, shutdown_at_exit=False, connect_only=True)
|
||||
ray.worker._global_node = node
|
||||
|
||||
# TODO(suquark): Use "node" as the input of "connect".
|
||||
ray.worker.connect(
|
||||
info, redis_password=args.redis_password, mode=ray.WORKER_MODE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user