BentoML: build a Bento and deploy it to BentoCloud
domain: ml-ops · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
`pip install bentoml`, then define your Service in `service.py` using `@bentoml.service(image=bentoml.images.Image(python_version="3.11").python_packages(...))`
Authenticate the CLI with `bentoml cloud login` (creates or accepts an API token)
Build a versioned local artifact with `bentoml build` (packages source, models, dependencies, and config into a Bento; list built Bentos with `bentoml list`) — this is the local-only subset of the deploy workflow
Deploy directly to BentoCloud from the project directory with `bentoml deploy -n <deployment-name>` (builds, pushes, and creates the Deployment in one step) and wait for it to report ready
After code changes, update the live Deployment with `bentoml deployment update <name> --bento ./project/directory`, and tune autoscaling with `bentoml deployment update <name> --scaling-min 0 --scaling-max 3`
Retrieve the endpoint with `bentoml deployment get <name> -o json | jq .endpoint_urls` and call it via `bentoml.SyncHTTPClient(url)`; tear down with `bentoml deployment terminate <name>`
Known gotchas
`bentoml build`/`bentoml deploy` package every file under the directory they're run from by default — exclude unwanted files/directories with a `.bentoignore` file
To test the packaged artifact locally without BentoCloud, containerize it with `bentoml containerize <bento_tag>` and run it with Docker rather than deploying
On Apple Silicon Macs, containerizing without `--platform=linux/amd64` can produce images with Python-library compatibility issues when later deployed to x86 cloud infrastructure
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?