Skip to content

Commit 65b7727

Browse files
Alienfeelmrwyattii
andauthored
Fix 4649 (#4650)
Co-authored-by: Michael Wyatt <[email protected]>
1 parent d37fc25 commit 65b7727

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deepspeed/launcher/runner.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ def main(args=None):
443443
if not args.master_addr:
444444
assert multi_node_exec
445445
first_host = list(active_resources.keys())[0]
446-
hostname_cmd = [f"ssh {first_host} hostname -I"]
446+
ssh_check_cmd = "ssh "
447+
if args.ssh_port is not None:
448+
ssh_check_cmd += f" -p {args.ssh_port}"
449+
ssh_check_cmd += f" {first_host} hostname -I"
450+
hostname_cmd = [ssh_check_cmd]
447451
try:
448452
result = subprocess.check_output(hostname_cmd, shell=True)
449453
except subprocess.CalledProcessError as err:

0 commit comments

Comments
 (0)