diff --git a/openllm-python/src/openllm/_llm.py b/openllm-python/src/openllm/_llm.py index 7e0ad43f..08c77cdb 100644 --- a/openllm-python/src/openllm/_llm.py +++ b/openllm-python/src/openllm/_llm.py @@ -892,10 +892,13 @@ class LLM(LLMInterface[M, T], ReprMixin): ''' models = models if models is not None else [] - try: - models.append(self._bentomodel) - except bentoml.exceptions.NotFound as err: - raise RuntimeError(f'Failed to locate {self._bentomodel}:{err}') from None + if os.environ.get('BENTO_PATH') is None: + # Hmm we should only add this if it is not in the container environment + # BentoML sets BENTO_PATH so we can use this as switch logic here. + try: + models.append(self._bentomodel) + except bentoml.exceptions.NotFound as err: + raise RuntimeError(f'Failed to locate {self._bentomodel}:{err}') from None generate_sig = ModelSignature.from_dict(ModelSignatureDict(batchable=False)) embeddings_sig = ModelSignature.from_dict(ModelSignatureDict(batchable=True, batch_dim=0)) diff --git a/wheels.sh b/wheels.sh new file mode 100644 index 00000000..65581f79 --- /dev/null +++ b/wheels.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + + +set -eo pipefail + +GIT_ROOT="$(git rev-parse --show-toplevel)" +cd "$GIT_ROOT" || exit 1 + +mkdir -p dist + +pushd openllm-client &>/dev/null + +python -m build -w && mv dist/* ../dist + +popd &>/dev/null + +pushd openllm-core &>/dev/null + +python -m build -w && mv dist/* ../dist + +popd &>/dev/null + +pushd openllm-python &>/dev/null + +python -m build -w && mv dist/* ../dist + +popd &>/dev/null