From 39c598bab0929f007a49daa7262a7c9ee6492221 Mon Sep 17 00:00:00 2001 From: Ian Rodney Date: Tue, 8 Sep 2020 10:25:24 -0700 Subject: [PATCH] [docker] No Docker CP if File Mount (#10633) --- python/ray/autoscaler/commands.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 801aed273..6a9f92a1f 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -958,6 +958,12 @@ def rsync(config_file: str, config["cluster_name"] = override_cluster_name config = _bootstrap_config(config, no_config_cache=no_config_cache) + is_file_mount = False + for remote_mount in config.get("file_mounts", {}).keys(): + if remote_mount in (source if down else target): + is_file_mount = True + break + provider = get_node_provider(config["provider"], config["cluster_name"]) try: nodes = [] @@ -997,7 +1003,7 @@ def rsync(config_file: str, cmd_output_util.set_output_redirected(False) set_rsync_silent(False) - rsync(source, target) + rsync(source, target, is_file_mount) else: updater.sync_file_mounts(rsync)