mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[Autoscaler] Actually try to catch when docker does not exist (#10549)
This commit is contained in:
parent
89bf262130
commit
c54853d45b
1 changed files with 5 additions and 4 deletions
|
@ -659,10 +659,11 @@ class DockerCommandRunner(CommandRunnerInterface):
|
||||||
self.container_name)
|
self.container_name)
|
||||||
|
|
||||||
def _check_docker_installed(self):
|
def _check_docker_installed(self):
|
||||||
try:
|
no_exist = "NoExist"
|
||||||
self.ssh_command_runner.run("command -v docker")
|
output = self.ssh_command_runner.run(
|
||||||
return
|
f"command -v docker || echo '{no_exist}'", with_output=True)
|
||||||
except Exception:
|
cleaned_output = output.decode().strip()
|
||||||
|
if no_exist in cleaned_output or "docker" not in cleaned_output:
|
||||||
install_commands = [
|
install_commands = [
|
||||||
"curl -fsSL https://get.docker.com -o get-docker.sh",
|
"curl -fsSL https://get.docker.com -o get-docker.sh",
|
||||||
"sudo sh get-docker.sh", "sudo usermod -aG docker $USER",
|
"sudo sh get-docker.sh", "sudo usermod -aG docker $USER",
|
||||||
|
|
Loading…
Add table
Reference in a new issue