diff --git a/pyproject.toml b/pyproject.toml index a09d70f741..4af96ba5a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,6 @@ dependencies = [ "opentelemetry-sdk==1.13.0", "opentelemetry-semantic-conventions==0.34b0", "opentelemetry-util-http==0.34b0", - "filetype", "packaging>=20.0", "pathspec", "pip-tools>=6.6.2", @@ -113,15 +112,20 @@ include = [ [project.optional-dependencies] all = [ "bentoml[aws]", - "bentoml[io-json]", - "bentoml[io-image]", - "bentoml[io-pandas]", + "bentoml[io]", "bentoml[grpc]", "bentoml[grpc-reflection]", "bentoml[grpc-channelz]", "bentoml[tracing]", ] aws = ["fs-s3fs"] +io = [ + "bentoml[io-json]", + "bentoml[io-image]", + "bentoml[io-pandas]", + "bentoml[io-file]", +] # syntatic sugar for bentoml[io-json,io-image,io-pandas,io-file] +io-file = ["filetype"] # Currently use for from_sample io-json = ["pydantic<2"] # currently we don't have support for pydantic 2.0 io-image = ["Pillow"] io-pandas = ["pandas", "pyarrow"] diff --git a/src/bentoml/_internal/io_descriptors/base.py b/src/bentoml/_internal/io_descriptors/base.py index 4bbd74fa8d..3d26758a00 100644 --- a/src/bentoml/_internal/io_descriptors/base.py +++ b/src/bentoml/_internal/io_descriptors/base.py @@ -20,6 +20,7 @@ from ..context import InferenceApiContext as Context from ..service.openapi.specification import Schema from ..service.openapi.specification import Reference + from ..service.openapi.specification import MediaType InputType = ( UnionType diff --git a/src/bentoml/bentos.py b/src/bentoml/bentos.py index 46f9f7cd13..165e1ce966 100644 --- a/src/bentoml/bentos.py +++ b/src/bentoml/bentos.py @@ -445,6 +445,8 @@ def construct_dockerfile( "grpc-channelz", "aws", "all", + "io", + "io-file", "io-image", "io-pandas", "io-json",