[autoscaler] Fix Submit (#4174)

This commit is contained in:
Richard Liaw
2019-02-27 00:02:50 -08:00
committed by GitHub
parent 641f703879
commit 5bfcfa8ec8
+8 -3
View File
@@ -610,6 +610,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,
@@ -637,8 +642,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:
@@ -655,7 +660,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)