[autoscaler] Fix redirects, fix submit (#4085)

This commit is contained in:
Richard Liaw
2019-02-20 21:35:33 -08:00
committed by GitHub
parent 3549cd8195
commit acf4d53b55
3 changed files with 27 additions and 11 deletions
+8 -3
View File
@@ -573,6 +573,11 @@ def rsync_up(cluster_config_file, source, target, cluster_name):
@cli.command()
@click.argument("cluster_config_file", required=True, type=str)
@click.option(
"--docker",
is_flag=True,
default=False,
help="Runs command in the docker container specified in cluster_config.")
@click.option(
"--stop",
is_flag=True,
@@ -600,8 +605,8 @@ def rsync_up(cluster_config_file, source, target, cluster_name):
"--port-forward", required=False, type=int, help="Port to forward.")
@click.argument("script", required=True, type=str)
@click.argument("script_args", required=False, type=str, nargs=-1)
def submit(cluster_config_file, screen, tmux, stop, start, cluster_name,
port_forward, script, script_args):
def submit(cluster_config_file, docker, screen, tmux, stop, start,
cluster_name, port_forward, script, script_args):
"""Uploads and runs a script on the specified cluster.
The script is automatically synced to the following location:
@@ -618,7 +623,7 @@ def submit(cluster_config_file, screen, tmux, stop, start, cluster_name,
rsync(cluster_config_file, script, target, cluster_name, down=False)
cmd = " ".join(["python", target] + list(script_args))
exec_cluster(cluster_config_file, cmd, screen, tmux, stop, False,
exec_cluster(cluster_config_file, cmd, docker, screen, tmux, stop, False,
cluster_name, port_forward)