mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05: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:
parent
8b3f79f307
commit
ac9610b19d
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue