@@ -388,8 +388,8 @@ def dump_cluster_folder(config, output_folder):
388
388
os .makedirs (cluster_folder , exist_ok = True ) # directory already exists
389
389
os .makedirs (scripts_folder , exist_ok = True ) # directory already exists
390
390
391
- cluster_file = "config.yaml"
392
- cluster_file_path = os .path .join (cluster_folder , cluster_file )
391
+ cluster_file_name = "config.yaml"
392
+ cluster_file_path = os .path .join (cluster_folder , cluster_file_name )
393
393
394
394
# get source path of ssh keys and extract their name
395
395
original_private_key_path = os .path .expanduser (config ['auth' ]['ssh_private_key' ])
@@ -401,7 +401,7 @@ def dump_cluster_folder(config, output_folder):
401
401
new_public_key_path = new_private_key_path + '.pub'
402
402
config ['auth' ]['ssh_private_key' ] = Path (new_private_key_path ).name
403
403
404
- # dump config to cluster cluster_file
404
+ # dump config to cluster cluster_file
405
405
with open (cluster_file_path , 'w' ) as file :
406
406
yaml .dump (config , file , default_flow_style = False )
407
407
@@ -412,11 +412,11 @@ def dump_cluster_folder(config, output_folder):
412
412
413
413
write_script ('create.sh' ,
414
414
scripts_folder ,
415
- [f"ray up -y { cluster_file_path } " ])
415
+ [f"ray up -y { cluster_file_name } " ])
416
416
417
417
write_script ('connect.sh' ,
418
418
scripts_folder ,
419
- [f"ray dashboard --port 8265 --remote-port 8265 { cluster_file_path } " ])
419
+ [f"ray dashboard --port 8265 --remote-port 8265 { cluster_file_name } " ])
420
420
421
421
# kill tunnel created by ray dashboard by killing the PIDs involved
422
422
write_script ('disconnect.sh' ,
@@ -426,7 +426,11 @@ def dump_cluster_folder(config, output_folder):
426
426
427
427
write_script ('terminate.sh' ,
428
428
scripts_folder ,
429
- [f"ray down -y { cluster_file_path } " ])
429
+ [f"ray down -y { cluster_file_name } " ])
430
+
431
+ write_script ('stop.sh' ,
432
+ scripts_folder ,
433
+ [f"ray stop -y { cluster_file_name } " ])
430
434
431
435
write_script ('ray.sh' ,
432
436
scripts_folder ,
0 commit comments