diff --git a/src/bentoml/_internal/container/base.py b/src/bentoml/_internal/container/base.py index 7bd22b5d7b..5a2d0c6ef6 100644 --- a/src/bentoml/_internal/container/base.py +++ b/src/bentoml/_internal/container/base.py @@ -49,6 +49,7 @@ def construct_args(self, args: t.Any, opt: str = ""): @construct_args.register(type(None)) @construct_args.register(tuple) + @construct_args.register(list) def _(self, args: ArgType, opt: str = ""): if args is not None: self.extend( diff --git a/src/bentoml/_internal/utils/buildx.py b/src/bentoml/_internal/utils/buildx.py index fe13f2c2b6..008852ccd4 100644 --- a/src/bentoml/_internal/utils/buildx.py +++ b/src/bentoml/_internal/utils/buildx.py @@ -30,5 +30,9 @@ def health(): def build(**kwargs: t.Any): # subprocess_env from bentoctl will be handle by buildx, so it is safe to pop this out. kwargs.pop("subprocess_env") + kwargs["tag"] = kwargs.pop("tags") context_path = kwargs.pop("cwd", None) + for key, value in kwargs.items(): + if not value: + kwargs[key] = None _buildx_backend.build(context_path=context_path, **kwargs)