mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-05-04 13:52:46 -04:00
fix(build): quote environment variables
Make sure that the config is quoted properly in generated Dockerfile Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -162,7 +162,7 @@ def construct_docker_options(
|
||||
|
||||
env_dict = {
|
||||
env.framework: env.framework_value,
|
||||
env.config: llm.config.model_dump_json().decode(),
|
||||
env.config: f"'{llm.config.model_dump_json().decode()}'",
|
||||
"OPENLLM_MODEL": llm.config["model_name"],
|
||||
"OPENLLM_MODEL_ID": llm.model_id,
|
||||
"BENTOML_DEBUG": str(get_debug_mode()),
|
||||
@@ -233,7 +233,9 @@ def _build_bento(
|
||||
name=bento_tag.name,
|
||||
labels=labels,
|
||||
description=f"OpenLLM service for {llm.config['start_name']}",
|
||||
include=list(llm_fs.walk.files(filter=["*.py"])), # NOTE: By default, we are using _service.py as the default service, for now.
|
||||
include=list(
|
||||
llm_fs.walk.files(filter=["*.py"])
|
||||
), # NOTE: By default, we are using _service.py as the default service, for now.
|
||||
exclude=["/venv", "__pycache__/", "*.py[cod]", "*$py.class"],
|
||||
python=construct_python_options(llm, llm_fs, extra_dependencies),
|
||||
docker=construct_docker_options(llm, llm_fs, workers_per_resource, quantize, bettertransformer),
|
||||
|
||||
@@ -840,7 +840,7 @@ def build(
|
||||
_echo("\n" + OPENLLM_FIGLET, fg="white")
|
||||
if not _previously_built:
|
||||
_echo(f"Successfully built {bento}.", fg="green")
|
||||
else:
|
||||
elif not overwrite:
|
||||
_echo(
|
||||
f"'{model_name}' already has a Bento built [{bento}]. To overwrite it pass '--overwrite'.",
|
||||
fg="yellow",
|
||||
|
||||
Reference in New Issue
Block a user