Skip to content

Create Bentos

Introduction

A bento is a file archive with all the model training source code and APIs defined for serving: saved binary models, data files, Dockerfiles, dependencies, and additional configurations. Everything fits together as a unit and is packaged into a standardized format.

Bento Service

Every bento must consists of the following files:

  • service.py - User defined inference program is converted into an api service using this service.py file

  • bentoml.yaml - This is a configuration file used for building a bento

Learn More: Create Bento Service

Build

A Bento can be created with the bentoml build CLI command with a bentofile.yaml build file.

 bentoml build
When bento is built successfully, bento_image_name:bento_image_tag is displayed as shown in Figure 1

Figure 1: Successful BentoML Creation
Figure 1: Successful BentoML Creation

List locally built bentos

 bentoml list

Display bento contents

 cd $(bentoml get <bento_image_name>:latest -o path)
 tree

Learn More: Build Bento

Figure 2: Bento Tree
Figure 2: Bento Tree

Next up

Deploy Bentos

BSD 3-Clause License: See License.