We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 679c677 commit bdcb56fCopy full SHA for bdcb56f
src/clip_api_service/build.py
@@ -1,5 +1,7 @@
1
from __future__ import annotations
2
3
+from clip_api_service.models import MODEL_ENV_VAR_KEY
4
+
5
import os
6
7
@@ -13,6 +15,11 @@ def build_bento(model_name: str | None = None, use_gpu: bool = False):
13
15
14
16
bento_file = clip_module.bentofile_path(use_gpu=use_gpu)
17
18
+ # Setting Model name as environment variable to pass
19
+ # into subprocess for bento build
20
+ if model_name:
21
+ os.environ[MODEL_ENV_VAR_KEY] = model_name
22
23
# Get parent directory path
24
build_ctx = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
25
bentoml.bentos.build_bentofile(bento_file, build_ctx=build_ctx)
0 commit comments