fix(build): make sure not to overwrite missing openllm

in build without dev mode

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-06-21 13:51:37 -04:00
parent 703cb21e96
commit a85953d6bf

View File

@@ -84,14 +84,13 @@ def construct_python_options(
llm_fs: FS,
extra_dependencies: tuple[str, ...] | None = None,
) -> PythonOptions:
packages = ["openllm"]
# NOTE: add openllm to the default dependencies
# if users has openllm custom built wheels, it will still respect
# that since bentoml will always install dependencies from requirements.txt
# first, then proceed to install everything inside the wheels/ folder.
if extra_dependencies is not None:
packages = [f"openllm[{k}]" for k in extra_dependencies]
else:
packages = ["openllm"]
packages += [f"openllm[{k}]" for k in extra_dependencies]
if llm.config["requirements"] is not None:
packages.extend(llm.config["requirements"])