From a252aa29da9feb2faec62a59c9cac3a1c2b72e34 Mon Sep 17 00:00:00 2001 From: Ian Rodney Date: Thu, 13 Aug 2020 20:35:06 -0700 Subject: [PATCH] [docker] Wrap more internal items with run_env="host" (#10078) --- python/ray/autoscaler/command_runner.py | 1 + python/ray/autoscaler/updater.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/ray/autoscaler/command_runner.py b/python/ray/autoscaler/command_runner.py index beac9d946..6d7ef5e1c 100644 --- a/python/ray/autoscaler/command_runner.py +++ b/python/ray/autoscaler/command_runner.py @@ -556,6 +556,7 @@ class DockerCommandRunner(SSHCommandRunner): ssh_options_override_ssh_key=ssh_options_override_ssh_key) def run_rsync_up(self, source, target): + # TODO(ilr) Expose this to before NodeUpdater::sync_file_mounts protected_path = target if target.find("/root") == 0: target = target.replace("/root", "/tmp/root") diff --git a/python/ray/autoscaler/updater.py b/python/ray/autoscaler/updater.py index eaa3f7571..e0ab94f47 100644 --- a/python/ray/autoscaler/updater.py +++ b/python/ray/autoscaler/updater.py @@ -145,8 +145,9 @@ class NodeUpdater: with LogTimer(self.log_prefix + "Synced {} to {}".format(local_path, remote_path)): - self.cmd_runner.run("mkdir -p {}".format( - os.path.dirname(remote_path))) + self.cmd_runner.run( + "mkdir -p {}".format(os.path.dirname(remote_path)), + run_env="host") sync_cmd(local_path, remote_path) if remote_path not in nolog_paths: @@ -188,7 +189,7 @@ class NodeUpdater: "{}Waiting for remote shell...", self.log_prefix) - self.cmd_runner.run("uptime") + self.cmd_runner.run("uptime", run_env="host") cli_logger.old_debug(logger, "Uptime succeeded.") cli_logger.success("Success.") return True