bentofile.yaml is the declarative build configuration for a BentoML service. It identifies the service entry point, packages application files and dependencies, and supplies container environment variables for reproducible deployment. section 6.1.1 section 10.5
Configure the build around the components that must travel with the service:
- Set service to the Python module and service object, such as service: "service:svc". section 6.1.1
- Add labels for ownership or other build metadata. section 6.1.1
- Include service code, environment files, source modules, model artifacts, and requirements files. section 6.1.1 section 10.5
- Declare Python dependencies through requirements_txt and configure Docker environment variables or a base image. section 6.1.1 section 10.5
Packaging an income-classification service
A configuration can bind service:svc, include service.py, production.env, src/*.py, requirements.txt, and *.env, install requirements.txt, and inject local AWS credentials and ENV_NAME values. Running bentoml build creates a versioned Bento that can then be containerized or pushed to BentoCloud. section 6.1.1 section 10.5
Listing 6.4 bentofile.yaml to package our application
Inspect the complete bentofile.yaml listing, including service binding, file inclusion, Python requirements, labels, and Docker environment variables. section 6.1.1
