mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
[ci/release] Quote pip installs in client runner (#23888)
What: Quotes pip install packages in local environment setup for client runner. Why: Strings like pyarrow>=6.0.1<7.0.0 currently don't work as they are interpreted as output redirection.
This commit is contained in:
parent
40d3a62aa1
commit
5e1218aae1
2 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
import json
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
@ -34,7 +35,10 @@ def install_cluster_env_packages(cluster_env: Dict[Any, Any]):
|
|||
|
||||
for package in packages:
|
||||
subprocess.check_output(
|
||||
f"pip install -U {package}", shell=True, env=os.environ, text=True
|
||||
f"pip install -U {shlex.quote(package)}",
|
||||
shell=True,
|
||||
env=os.environ,
|
||||
text=True,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import importlib
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
@ -289,7 +290,10 @@ def install_matching_ray_locally(ray_wheels: Optional[str]):
|
|||
"pip uninstall -y ray", shell=True, env=os.environ, text=True
|
||||
)
|
||||
subprocess.check_output(
|
||||
f"pip install -U {ray_wheels}", shell=True, env=os.environ, text=True
|
||||
f"pip install -U {shlex.quote(ray_wheels)}",
|
||||
shell=True,
|
||||
env=os.environ,
|
||||
text=True,
|
||||
)
|
||||
for module_name in RELOAD_MODULES:
|
||||
if module_name in sys.modules:
|
||||
|
|
Loading…
Add table
Reference in a new issue