nixpkgs/pkgs/development/python-modules/vllm/0003-propagate-pythonpath.patch

13 lines
685 B
Diff

diff --git a/vllm/model_executor/models/registry.py b/vllm/model_executor/models/registry.py
index a2de597c8..4c2410209 100644
--- a/vllm/model_executor/models/registry.py
+++ b/vllm/model_executor/models/registry.py
@@ -1121,7 +1121,7 @@ def _run_in_subprocess(fn: Callable[[], _T]) -> _T:
# cannot use `sys.executable __file__` here because the script
# contains relative imports
returned = subprocess.run(
- _SUBPROCESS_COMMAND, input=input_bytes, capture_output=True
+ _SUBPROCESS_COMMAND, input=input_bytes, capture_output=True, env={'PYTHONPATH': ':'.join(sys.path)},
)
# check if the subprocess is successful