Skip to content

Commit 4661838

Browse files
committed
chore: move out the template to separate files
Signed-off-by: Aaron Pham <[email protected]>
1 parent fbab26d commit 4661838

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% extends bento_base_template %}
2+
{% block SETUP_BENTO_BASE_IMAGE %}
3+
{{ super() }}
4+
{% endblock %}

openllm-python/src/_openllm_tiny/_entrypoint.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
gpu_memory_utilization=orjson.loads(coreutils.getenv('gpu_memory_utilization', default=orjson.dumps({__gpu_memory_utilization__}), var=['GPU_MEMORY_UTILISATION']))
5252
services_config=orjson.loads(coreutils.getenv('services_config',"""{__services_config__}"""))
5353
'''
54-
_DOCKERFILE_TEMPLATE = """\
55-
{% extends bento_base_template %}
56-
{% block SETUP_BENTO_BASE_IMAGE %}
57-
{{ super() }}
58-
{% endblock %}
59-
"""
6054

6155

6256
class ItemState(enum.Enum):
@@ -235,6 +229,7 @@ def start_command(
235229
"""
236230
import transformers
237231

232+
from _bentoml_impl.server import serve_http
238233
from bentoml._internal.service.loader import load
239234
from bentoml._internal.log import configure_server_logging
240235

@@ -284,9 +279,8 @@ def start_command(
284279
working_dir = os.path.abspath(os.path.dirname(__file__))
285280
if sys.path[0] != working_dir:
286281
sys.path.insert(0, working_dir)
287-
load('.', working_dir=working_dir).serve_http(
288-
working_dir=working_dir, reload=check_bool_env('RELOAD', default=False), development_mode=DEBUG
289-
)
282+
load('.', working_dir=working_dir).inject_config()
283+
serve_http('.', working_dir=working_dir, reload=check_bool_env('RELOAD', default=False), development_mode=DEBUG)
290284

291285

292286
def construct_python_options(llm_config, llm_fs):

0 commit comments

Comments
 (0)