Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.
Open
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
8 changes: 8 additions & 0 deletions bentoctl_sagemaker/create_deployable.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def create_deployable(
with bento_metafile.open("r", encoding="utf-8") as metafile:
info = BentoInfo.from_yaml_file(metafile)

enable_grpc = False
if hasattr(info.python, "extras_require"):
enable_grpc = (
info.python.extras_require is not None
and "grpc" in info.python.extras_require
)

options = asdict(info.docker)
options["dockerfile_template"] = TEMPLATE_PATH

Expand All @@ -65,6 +72,7 @@ def create_deployable(
DockerOptions(**options).with_defaults(),
str(deployable_path),
use_conda=not info.conda.is_empty(),
enable_grpc=enable_grpc,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as the lambda PR, we should add a config for gRPC to explicitly enable gRPC.
Also sagemaker doesn't support gRPC. We can do it for EC2 probably.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted.

)
)

Expand Down