mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:06:31 +08:00
[Autoscaler] Ensure ubuntu is owner of docker host mount folder (#13579)
* change ownership to ubuntu if root * use ssh user in cluster config * formatting Co-authored-by: Nikita Vemuri <nikitavemuri@Nikitas-MacBook-Pro.local>
This commit is contained in:
@@ -632,8 +632,10 @@ class DockerCommandRunner(CommandRunnerInterface):
|
||||
self._get_docker_host_mount_location(
|
||||
self.ssh_command_runner.cluster_name), target.lstrip("/"))
|
||||
|
||||
host_mount_location = os.path.dirname(host_destination.rstrip("/"))
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(host_destination.rstrip('/'))}",
|
||||
f"mkdir -p {host_mount_location} && chown -R "
|
||||
f"{self.ssh_command_runner.ssh_user} {host_mount_location}",
|
||||
silent=is_rsync_silent())
|
||||
|
||||
self.ssh_command_runner.run_rsync_up(
|
||||
@@ -655,8 +657,10 @@ class DockerCommandRunner(CommandRunnerInterface):
|
||||
host_source = os.path.join(
|
||||
self._get_docker_host_mount_location(
|
||||
self.ssh_command_runner.cluster_name), source.lstrip("/"))
|
||||
host_mount_location = os.path.dirname(host_source.rstrip("/"))
|
||||
self.ssh_command_runner.run(
|
||||
f"mkdir -p {os.path.dirname(host_source.rstrip('/'))}",
|
||||
f"mkdir -p {host_mount_location} && chown -R "
|
||||
f"{self.ssh_command_runner.ssh_user} {host_mount_location}",
|
||||
silent=is_rsync_silent())
|
||||
if source[-1] == "/":
|
||||
source += "."
|
||||
|
||||
Reference in New Issue
Block a user