Skip to content

Commit

Permalink
fix: enable image spec when image is explictly given (#5114)
Browse files Browse the repository at this point in the history
* fix: enable image spec when image is explictly given

Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming authored Dec 9, 2024
1 parent a8bf888 commit e277baf
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/bentoml/_internal/bento/bento.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,8 @@ def create(
else to_snake_case(svc.name)
)
build_config.envs.extend(svc.envs)
if enable_image:
if svc.image is not None:
image = svc.image
elif svc.image is not None:
logger.warning(
"BentoML service %s has an image config, but BentoML image feature is not enabled. "
"Please enable it by setting BENTOML_ENABLE_FEATURES=bento_image",
svc.name,
)
if image is None and enable_image:
image = get_image_from_build_config(build_config)
build_config = build_config.with_defaults()
Expand Down

0 comments on commit e277baf

Please sign in to comment.