CLI Reference¶
bentoml¶
BentoML CLI
bentoml [OPTIONS] COMMAND [ARGS]...
Options
- -v, --version¶
Show the version and exit.
build¶
Build a new Bento from current directory
bentoml build [OPTIONS] [BUILD_CTX]
Options
- -f, --bentofile <bentofile>¶
- --version <version>¶
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BUILD_CTX¶
Optional argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
containerize¶
Containerizes given Bento into a ready-to-use Docker image.
bentoml containerize [OPTIONS] BENTO_TAG
Options
- -t, --docker-image-tag <docker_image_tag>¶
Docker image tag, default to same as the Bento tag
- --build-arg <build_arg>¶
docker image build args
- --label <label>¶
docker image label
- --no-cache¶
- --platform <platform>¶
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
delete¶
Delete Bento in local bento store.
Specify target Bentos to remove:
bentoml delete [OPTIONS] DELETE_TARGETS
Options
- -y, --yes, --assume-yes¶
Skip confirmation when deleting a specific bento bundle
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- DELETE_TARGETS¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
export¶
Export Bento files to an archive file
bentoml export [OPTIONS] BENTO_TAG [OUT_PATH]
Options
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_TAG¶
Required argument
- OUT_PATH¶
Optional argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
get¶
Print Bento details by providing the bento_tag
bentoml get [OPTIONS] BENTO_TAG
Options
- -o, --output <output>¶
- Options
json | yaml | path
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
import¶
Import a previously exported Bento archive file
bentoml import [OPTIONS] BENTO_PATH
Options
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_PATH¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
list¶
List Bentos in local store
bentoml list [OPTIONS] [BENTO_NAME]
Options
- -o, --output <output>¶
- Options
json | yaml | table
- --no-trunc <no_trunc>¶
Don’t truncate the output
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_NAME¶
Optional argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
models¶
Model Subcommands Groups
bentoml models [OPTIONS] COMMAND [ARGS]...
delete¶
Delete Model in local model store.
Specify target Models to remove:
bentoml models delete [OPTIONS] DELETE_TARGETS
Options
- -y, --yes, --assume-yes¶
Skip confirmation when deleting a specific model
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- DELETE_TARGETS¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
export¶
Export Model files to an archive file
arguments:
examples:
bentoml models export [OPTIONS] MODEL_TAG [OUT_PATH]
Options
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_TAG¶
Required argument
- OUT_PATH¶
Optional argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
get¶
Print Model details by providing the model_tag
bentoml models get [OPTIONS] MODEL_TAG
Options
- -o, --output <output>¶
- Options
json | yaml | path
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
import¶
Import a previously exported Model archive file
bentoml models import ./my_model.bentomodel bentoml models import s3://mybucket/models/my_model.bentomodel
bentoml models import [OPTIONS] MODEL_PATH
Options
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_PATH¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
list¶
List Models in local store
bentoml models list [OPTIONS] [MODEL_NAME]
Options
- -o, --output <output>¶
- Options
json | yaml | table
- --no-trunc <no_trunc>¶
Don’t truncate the output
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_NAME¶
Optional argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
pull¶
Pull Model from a yatai server
bentoml models pull [OPTIONS] MODEL_TAG
Options
- -f, --force¶
Force pull from yatai to local and overwrite even if it already exists in local
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
push¶
Push Model to a yatai server
bentoml models push [OPTIONS] MODEL_TAG
Options
- -f, --force¶
Forced push to yatai even if it exists in yatai
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- MODEL_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
pull¶
Pull Bento from a yatai server
bentoml pull [OPTIONS] BENTO_TAG
Options
- -f, --force¶
Force pull from yatai to local and overwrite even if it already exists in local
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
push¶
Push Bento to a yatai server
bentoml push [OPTIONS] BENTO_TAG
Options
- -f, --force¶
Forced push to yatai even if it exists in yatai
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO_TAG¶
Required argument
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
serve¶
Start BentoServer from BENTO
BENTO is the serving target: it can be the import path of a bentoml.Service instance; a tag to a Bento in local Bento store; or a file path to a Bento directory, e.g.:
bentoml serve [OPTIONS] [BENTO]
Options
- --production¶
Run the BentoServer in production mode
- Default
False
- --port <port>¶
The port to listen on for the REST api server
- Default
3000
- --host <host>¶
The host to bind for the REST api server [defaults: 127.0.0.1(dev), 0.0.0.0(production)]
- --backlog <backlog>¶
The maximum number of pending connections.
- Default
2048
- --reload¶
Reload Service when code changes detected, this is only available in development mode
- Default
False
- --reload-delay <reload_delay>¶
Delay in seconds between each check if the Service needs to be reloaded
- Default
0.25
- --working-dir <working_dir>¶
When loading from source code, specify the directory to find the Service instance
- Default
.
- --run-with-ngrok, --ngrok¶
Use ngrok to relay traffic on a public endpoint to the local BentoServer, only available in dev mode
- Default
False
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Arguments
- BENTO¶
Optional argument
Environment variables
- BENTOML_PORT
Provide a default for
--port
- BENTOML_HOST
Provide a default for
--host
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config
yatai¶
Yatai Subcommands Groups
bentoml yatai [OPTIONS] COMMAND [ARGS]...
login¶
Login to Yatai server
bentoml yatai login [OPTIONS]
Options
- --endpoint <endpoint>¶
Yatai endpoint, i.e: https://yatai.com
- --api-token <api_token>¶
Yatai user API token
- -q, --quiet¶
Suppress all warnings and info logs
- --verbose, --debug¶
Generate debug information
- --do-not-track¶
Do not send usage info
- --config <config>¶
BentoML configuration YAML file to apply
Environment variables
- BENTOML_DO_NOT_TRACK
Provide a default for
--do-not-track
- BENTOML_CONFIG
Provide a default for
--config