cuddly-jelly-27016
05/14/2025, 12:13 AMsignal node that determines whether or not the bentoml model is deployed.
## High-level Proposal
Introduce 2 new tasks and a "service" construct to facilitate deploying bentoml service APIs directly from a flyte task:
• `bentoml_service`: a function decorator that allows end users to define a BentoML service, potentially in the same file as the Flyte task/workflow definitions.
• `BentoMLBuildTask`: creates a Bento, which is basically a directory archive of a bunch of modules, config files, and other artifacts packaged by bentoml when calling the bentoml.build function or bentoml build CLI command.
• `BentoMLDeployTask`: this would basically be a shell task that calls the following commands to deploy the Bento to some target cloud platform. This task would need to have secrets that enables the auto-deployment of the Bento to, e.g. AWS lambda without human intervention
You can find a proof-of-concept for this integration here: flyteorg/flytekit#1355. Note: The POC has been only been tested locally (not on an actual Flyte workflow, and assumes that you have docker push credentials to AWS ECR).
### Describe alternatives you've considered
1. just have end-users roll their own solutions
2. only implement the BentoMLTask to build Bento archives for deployment in some other process
3. Instead of the @bentoml_service decorator, have end-users write the bentoml.Service definition in a separate file, where they have to make sure they read in the correct environment variables.
### Propose: Link/Inline OR Additional context
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/14/2025, 12:13 AM