diff --git a/src/openllm/venv.py b/src/openllm/venv.py index 57356197e..09bb2a6e1 100644 --- a/src/openllm/venv.py +++ b/src/openllm/venv.py @@ -5,7 +5,8 @@ import typer -from openllm.common import VENV_DIR, VERBOSE_LEVEL, BentoInfo, VenvSpec, output, run_command +from openllm.common import (VENV_DIR, VERBOSE_LEVEL, BentoInfo, VenvSpec, + output, run_command) @functools.lru_cache @@ -33,6 +34,10 @@ def _ensure_venv(env_spec: VenvSpec) -> pathlib.Path: venv_py = venv / 'Scripts' / 'python.exe' if os.name == 'nt' else venv / 'bin' / 'python' try: run_command(['python', '-m', 'uv', 'venv', venv], silent=VERBOSE_LEVEL.get() < 10) + run_command( + ['python', '-m', 'uv', 'pip', 'install', '-p', str(venv_py), 'bentoml'], + silent=VERBOSE_LEVEL.get() < 10, + ) with open(venv / 'requirements.txt', 'w') as f: f.write(env_spec.normalized_requirements_txt) run_command(