fix: use venv python for vLLM service startup
This commit is contained in:
@@ -102,11 +102,17 @@ async def start_model_process(model_name: str) -> bool:
|
||||
env.update({
|
||||
'HF_TOKEN': os.getenv('HF_TOKEN', ''),
|
||||
'PORT': str(port),
|
||||
'HOST': '0.0.0.0'
|
||||
'HOST': '0.0.0.0',
|
||||
'MODEL_NAME': model_config.get('model_name', model_name)
|
||||
})
|
||||
|
||||
# Use venv python if it exists
|
||||
script_dir = script_path.parent
|
||||
venv_python = script_dir / 'venv' / 'bin' / 'python3'
|
||||
python_cmd = str(venv_python) if venv_python.exists() else 'python3'
|
||||
|
||||
proc = subprocess.Popen(
|
||||
['python3', str(script_path)],
|
||||
[python_cmd, str(script_path)],
|
||||
env=env,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
|
||||
Reference in New Issue
Block a user