mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 11:05:26 +08:00
Forward multiple ports for autoscaler (#5893)
This commit is contained in:
@@ -637,7 +637,11 @@ def rsync_up(cluster_config_file, source, target, cluster_name):
|
||||
type=str,
|
||||
help="Override the configured cluster name.")
|
||||
@click.option(
|
||||
"--port-forward", required=False, type=int, help="Port to forward.")
|
||||
"--port-forward",
|
||||
required=False,
|
||||
multiple=True,
|
||||
type=int,
|
||||
help="Port to forward. Use this multiple times to forward multiple ports.")
|
||||
@click.argument("script", required=True, type=str)
|
||||
@click.option("--args", required=False, type=str, help="Script args.")
|
||||
def submit(cluster_config_file, docker, screen, tmux, stop, start,
|
||||
@@ -665,7 +669,7 @@ def submit(cluster_config_file, docker, screen, tmux, stop, start,
|
||||
command_parts += [args]
|
||||
cmd = " ".join(command_parts)
|
||||
exec_cluster(cluster_config_file, cmd, docker, screen, tmux, stop, False,
|
||||
cluster_name, port_forward)
|
||||
cluster_name, list(port_forward))
|
||||
|
||||
|
||||
@cli.command()
|
||||
@@ -700,11 +704,15 @@ def submit(cluster_config_file, docker, screen, tmux, stop, start,
|
||||
type=str,
|
||||
help="Override the configured cluster name.")
|
||||
@click.option(
|
||||
"--port-forward", required=False, type=int, help="Port to forward.")
|
||||
"--port-forward",
|
||||
required=False,
|
||||
multiple=True,
|
||||
type=int,
|
||||
help="Port to forward. Use this multiple times to forward multiple ports.")
|
||||
def exec_cmd(cluster_config_file, cmd, docker, screen, tmux, stop, start,
|
||||
cluster_name, port_forward):
|
||||
exec_cluster(cluster_config_file, cmd, docker, screen, tmux, stop, start,
|
||||
cluster_name, port_forward)
|
||||
cluster_name, list(port_forward))
|
||||
|
||||
|
||||
@cli.command()
|
||||
|
||||
Reference in New Issue
Block a user