From cb81b1c6d1a7c14ce76f76218c613cab24d64ad4 Mon Sep 17 00:00:00 2001 From: bojiang Date: Fri, 2 Aug 2024 18:28:11 +0800 Subject: [PATCH] fix: install bentoml --- src/openllm/venv.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(