Skip to content

Commit

Permalink
fix: install bentoml
Browse files Browse the repository at this point in the history
  • Loading branch information
bojiang committed Aug 2, 2024
1 parent 74ffa7f commit cb81b1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/openllm/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit cb81b1c

Please sign in to comment.