Replies: 1 comment
|
Good question! Until native support lands, here are production-ready workarounds: Workaround 1: Separate Bentos + Service Composition # bento_a/service.py (Python 3.10, PyTorch)
@bentoml.service
class ModelA:
@bentoml.api
def predict(self, data): ...
# bento_b/service.py (Python 3.11, TensorFlow)
@bentoml.service
class ModelB:
@bentoml.api
def predict(self, data): ...
# orchestrator/service.py
@bentoml.service
class Orchestrator:
model_a = bentoml.depends(ModelA)
model_b = bentoml.depends(ModelB)Deploy each as separate containers, orchestrator routes between them. Workaround 2: BentoCloud with multiple deployments bentoml deploy bento_a:latest --name model-a
bentoml deploy bento_b:latest --name model-bThen call between deployments via HTTP. Workaround 3: Docker Compose for local services:
model-a:
build: ./bento_a
environment:
- PYTHON_VERSION=3.10
model-b:
build: ./bento_b
environment:
- PYTHON_VERSION=3.11Why this matters:
We deploy multi-model systems at Revolution AI — the separate-Bentos approach works well for production. Eager to see native support land! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, it seems that BentoML does not support defining unique runtime environments for each Service in a multi-Service Bento deployment. I found the following statement in the documentation:
I’d like to ask if there is any timeline for this feature. Is there an existing GitHub issue or development plan I can follow? Additionally, if there are any recommended workarounds in the meantime, I would appreciate any guidance.
Thanks for all the great work! 🙏
All reactions