Skip to content

Commit

Permalink
chore: handle args correctly and dispatch list type
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Dec 7, 2022
1 parent c5bd3a3 commit 412036a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bentoml/_internal/container/base.py
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions src/bentoml/_internal/utils/buildx.py
Expand Up @@ -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)

0 comments on commit 412036a

Please sign in to comment.