diff --git a/python/ray/autoscaler/command_runner.py b/python/ray/autoscaler/command_runner.py index 03242958d..efbd062c9 100644 --- a/python/ray/autoscaler/command_runner.py +++ b/python/ray/autoscaler/command_runner.py @@ -481,9 +481,8 @@ class DockerCommandRunner(SSHCommandRunner): ssh_options_override=ssh_options_override) def run_rsync_up(self, source, target): - protected_path = "" + protected_path = target if target.find("/root") == 0: - protected_path = target target = target.replace("/root", "/tmp/root") self.ssh_command_runner.run( f"mkdir -p {os.path.dirname(target)}", run_env="host") @@ -494,9 +493,8 @@ class DockerCommandRunner(SSHCommandRunner): self._docker_expand_user(protected_path))) def run_rsync_down(self, source, target): - protected_path = "" + protected_path = source if source.find("/root") == 0: - protected_path = source source = source.replace("/root", "/tmp/root") self.ssh_command_runner.run( f"mkdir -p {os.path.dirname(source)}", run_env="host")