mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 21:04:35 +08:00
Properly call mkdir on rsync (#9995)
This commit is contained in:
@@ -484,8 +484,8 @@ class DockerCommandRunner(SSHCommandRunner):
|
||||
protected_path = target
|
||||
if target.find("/root") == 0:
|
||||
target = target.replace("/root", "/tmp/root")
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(target)}", run_env="host")
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(target.rstrip('/'))}", run_env="host")
|
||||
self.ssh_command_runner.run_rsync_up(source, target)
|
||||
if self._check_container_status():
|
||||
self.ssh_command_runner.run("docker cp {} {}:{}".format(
|
||||
@@ -496,8 +496,8 @@ class DockerCommandRunner(SSHCommandRunner):
|
||||
protected_path = source
|
||||
if source.find("/root") == 0:
|
||||
source = source.replace("/root", "/tmp/root")
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(source)}", run_env="host")
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(source.rstrip('/'))}", run_env="host")
|
||||
self.ssh_command_runner.run("docker cp {}:{} {}".format(
|
||||
self.docker_name, self._docker_expand_user(protected_path),
|
||||
source))
|
||||
|
||||
Reference in New Issue
Block a user