mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 22:29:46 +08:00
[Autoscaler] Precisely match docker HOME (#12020)
* [Autoscaler] Precisely match docker HOME The current grep will match any env variable keyed by HOME. This will include some unwanted variables like PYTHONHOME, PROJECT_HOME, etc. Depending on the order of the environment variable, the subsequent docker setup command might fail. * fstring
This commit is contained in:
@@ -669,8 +669,7 @@ class DockerCommandRunner(CommandRunnerInterface):
|
||||
if user_pos > -1:
|
||||
if self.home_dir is None:
|
||||
self.home_dir = self.ssh_command_runner.run(
|
||||
"docker exec {} env | grep HOME | cut -d'=' -f2".format(
|
||||
self.container_name),
|
||||
f"docker exec {self.container_name} printenv HOME",
|
||||
with_output=True).decode("utf-8").strip()
|
||||
|
||||
if any_char:
|
||||
|
||||
Reference in New Issue
Block a user