How to start a Ray cluster on one local server using yaml file config without docker

Viewed 803

Could any one help me how to start ray on local server by a config file? My current local server can run Ray successfully when using below command:

ray start --head --node-ip-address 127.0.0.1 --port 6379 --dashboard-host 0.0.0.0 --dashboard-port 8265 --gcs-server-port 8075 --object-manager-port 8076 --node-manager-port 8077 --min-worker-port 10002 --max-worker-port 19999

But now I need to move it to a config file so that other service can control it. I did try to make a cluster.yaml file and start it with command ray up cluster.yaml, but it's facing error. The content of cluster.yaml file is:

cluster_name: default
max_workers: 1
upscaling_speed: 1.0
idle_timeout_minutes: 5

provider:
 ​type: local
 ​head_ip: 0.0.0.0
 ​worker_ips:
   ​- 127.0.0.1
auth:
 ​ssh_user: root
 ​ssh_private_key: ~/.ssh/id_rsa

file_mounts: {}
cluster_synced_files: []
file_mounts_sync_continuously: False

rsync_exclude:
 ​- "**/.git"
 ​- "**/.git/**"

rsync_filter:
 ​- ".gitignore"

initialization_commands: []

setup_commands: []
head_setup_commands: []
worker_setup_commands: []
head_start_ray_commands:
 ​- ray stop
 ​- ray start --head --port 6379 --dashboard-host '0.0.0.0' --dashboard-port 8265 --gcs-server-port 8075 --object-manager-port 8076 --node-manager-port 8077 --min-worker-port 10002 --max-worker-port 19999 --autoscaling-config=~/ray_bootstrap_config.yaml

worker_start_ray_commands:
 ​- ray stop
 ​- ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}

But it's unable to start due to below error:

<1/1> Setting up head node
 ​Prepared bootstrap config
2022-01-27 05:52:26,910 INFO node_provider.py:103 -- ClusterState: Writing cluster state: ['127.0.0.1', '0.0.0.0']
[1/7] Waiting for SSH to become available
   ​Running `uptime` as a test.
   ​Fetched IP: 0.0.0.0
05:52:33 up  3:43,  0 users,  load average: 0.10, 0.18, 0.16
Shared connection to 0.0.0.0 closed.
   ​Success.
[2/7] Processing file mounts
[3/7] No worker file mounts to sync
[4/7] No initialization commands to run.
[5/7] Initalizing command runner
[6/7] No setup commands to run.
[7/7] Starting the Ray runtime
Shared connection to 0.0.0.0 closed.
Local node IP: 192.168.1.18
2022-01-27 05:52:37,541 INFO services.py:1340 -- View the Ray dashboard at http://192.168.1.18:8265
Traceback (most recent call last):
 ​File "/usr/local/lib/python3.7/dist-packages/ray/node.py", line 240, in __init__
   ​self.redis_password)
 ​File "/usr/local/lib/python3.7/dist-packages/ray/_private/services.py", line 324, in wait_for_node
   ​raise TimeoutError("Timed out while waiting for node to startup.")
TimeoutError: Timed out while waiting for node to startup.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 ​File "/usr/local/bin/ray", line 8, in <module>
   ​sys.exit(main())
 ​File "/usr/local/lib/python3.7/dist-packages/ray/scripts/scripts.py", line 1989, in main
   ​return cli()
 ​File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1128, in __call__
   ​return self.main(*args, **kwargs)
 ​File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1053, in main
   ​rv = self.invoke(ctx)
 ​File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1659, in invoke
   ​return _process_result(sub_ctx.command.invoke(sub_ctx))
 ​File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1395, in invoke
   ​return ctx.invoke(self.callback, **ctx.params)
 ​File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 754, in invoke
   ​return __callback(*args, **kwargs)
 ​File "/usr/local/lib/python3.7/dist-packages/ray/scripts/scripts.py", line 633, in start
   ​ray_params, head=True, shutdown_at_exit=block, spawn_reaper=block)
 ​File "/usr/local/lib/python3.7/dist-packages/ray/node.py", line 243, in __init__
   ​"The current node has not been updated within 30 "
Exception: The current node has not been updated within 30 seconds, this could happen because of some of the Ray processes failed to startup.
Shared connection to 0.0.0.0 closed.
2022-01-27 05:53:07,718 INFO node_provider.py:103 -- ClusterState: Writing cluster state: ['127.0.0.1', '0.0.0.0']
 ​New status: update-failed
 ​!!!
 ​SSH command failed.
 ​!!!

 ​Failed to setup head node.
0 Answers
Related