diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 352c41426..b4d853cb2 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -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)