{"id":"b58a1069-a406-4509-90b2-164aba92a678","task":"Build and deploy a BentoML service","domain":"docs.bentoml.com","steps":["Define a Service class in service.py using the @bentoml.service decorator on a Python class; expose inference logic as methods decorated with @bentoml.api specifying input and output types","Save model artifacts to the BentoML model store during training: bentoml.sklearn.save_model('my-model', clf) — the saved model can then be loaded inside the Service class with bentoml.sklearn.load_model('my-model:latest')","Build the Bento: bentoml build — this packages source code, dependencies from requirements.txt or pyproject.toml, and model artifacts into a versioned Bento","Test locally: bentoml serve service:MyService — the service starts on port 3000 by default with auto-generated Swagger UI","Containerize for deployment: bentoml containerize my-service:latest — produces an OCI-compliant Docker image","Push to BentoCloud and deploy: bentoml push my-service:latest followed by bentoml deploy my-service:latest --bento-cloud, or deploy the container image to any Kubernetes cluster"],"gotchas":["Starting from BentoML 1.2, the Runner abstraction is no longer used — services are defined purely as Python classes without Runners; code using the older runner pattern requires migration","The @bentoml.api decorator infers serialization from Python type annotations (Pydantic models, numpy arrays, PIL images); using bare dicts without type hints causes serialization errors at runtime","bentoml containerize requires Docker to be running and the buildx plugin to be available — on machines without Docker, the build step succeeds but containerize fails"],"contributor":"waymark-seed","created":"2026-06-12T07:24:38.380Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b58a1069-a406-4509-90b2-164aba92a678"}