Skip to content

Commit 14ef238

Browse files
committed
change config file path to relative i.e. basename
1 parent 117ffe0 commit 14ef238

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = ibm-ray-config
3-
version = 1.0.0b15
3+
version = 1.0.0b18
44
author = Omer J Cohen
55
author_email = [email protected]
66
description = Interactive tool generating ray configuration for IBM platforms

src/ibm_ray_config/modules/utils.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ def dump_cluster_folder(config, output_folder):
388388
os.makedirs(cluster_folder, exist_ok=True) # directory already exists
389389
os.makedirs(scripts_folder, exist_ok=True) # directory already exists
390390

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)
393393

394394
# get source path of ssh keys and extract their name
395395
original_private_key_path = os.path.expanduser(config['auth']['ssh_private_key'])
@@ -401,7 +401,7 @@ def dump_cluster_folder(config, output_folder):
401401
new_public_key_path = new_private_key_path+'.pub'
402402
config['auth']['ssh_private_key'] = Path(new_private_key_path).name
403403

404-
# dump config to cluster cluster_file
404+
# dump config to cluster cluster_file
405405
with open(cluster_file_path, 'w') as file:
406406
yaml.dump(config, file, default_flow_style=False)
407407

@@ -412,11 +412,11 @@ def dump_cluster_folder(config, output_folder):
412412

413413
write_script('create.sh',
414414
scripts_folder,
415-
[f"ray up -y {cluster_file_path}"])
415+
[f"ray up -y {cluster_file_name}"])
416416

417417
write_script('connect.sh',
418418
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}"])
420420

421421
# kill tunnel created by ray dashboard by killing the PIDs involved
422422
write_script('disconnect.sh',
@@ -426,7 +426,11 @@ def dump_cluster_folder(config, output_folder):
426426

427427
write_script('terminate.sh',
428428
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}"])
430434

431435
write_script('ray.sh',
432436
scripts_folder,

0 commit comments

Comments
 (0)