Skip to content

fix: Merge command line args with the ones in the config file #5317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/bentoml/_internal/bento/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from ..configuration import get_bentoml_requirement
from ..configuration import get_debug_mode
from ..configuration import get_quiet_mode
from ..configuration.containers import BentoMLContainer
from ..container import generate_containerfile
from ..container.frontend.dockerfile import ALLOWED_CUDA_VERSION_ARGS
from ..container.frontend.dockerfile import CONTAINER_SUPPORTED_DISTROS
Expand Down Expand Up @@ -886,7 +887,9 @@ def __attrs_post_init__(self) -> None:
)

if self.args:
set_arguments(**self.args)
# Merge command line args with the ones in the config file
# and the command line args take precedence
set_arguments(**self.args, **BentoMLContainer.bento_arguments.get())

def with_defaults(self) -> FilledBentoBuildConfig:
"""
Expand Down