bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.15k stars 791 forks source link

bug: containerize fails (buildx version parse) #4154

Closed alexeyshockov closed 1 year ago

alexeyshockov commented 1 year ago

Describe the bug

bentoml containerize fails

The stacktrace:

Building OCI-compliant image for vendor_ranking:124f3a586b498bde251a152bfbe73415495273c8 with buildx

Encountered exception while trying to building image: Invalid version: 'v0.10.0-docker'
Traceback (most recent call last):
  File "/home/circleci/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bentoml/_internal/container/__init__.py", line 234, in build
    return builder.build(**kwargs)
  File "/home/circleci/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bentoml/_internal/container/base.py", line 165, in build
    cmds.extend(self.construct_build_args(**attrs))
  File "/home/circleci/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bentoml/_internal/container/buildx.py", line 125, in construct_build_args
    if supports_attestation():
  File "/home/circleci/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bentoml/_internal/container/buildx.py", line 43, in supports_attestation
    return parse(
  File "/home/circleci/.local/lib/python3.10/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/home/circleci/.local/lib/python3.10/site-packages/packaging/version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'v0.10.0-docker'

Exited with code exit status 1

And the Docker BuildX version

$> docker buildx version
github.com/docker/buildx v0.10.0-docker 876462897612d36679153c3414f7689626251501

To reproduce

Just run it in CircleCI

Expected behavior

It builds an image as before

Environment

BentoML 1.1.3

aarnphm commented 1 year ago

Yes I'm looking into this and will release a patch promptly.

aarnphm commented 1 year ago

Hey can you try out 1.1.4?

aarnphm commented 1 year ago

This has been reported to work on the latest release from the community, closing.