CLI Reference

bentoml

BentoML CLI tool

bentoml [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

config

Configure BentoML configurations and settings

bentoml config [OPTIONS] COMMAND [ARGS]...

reset

Reset all local BentoML configs to default

bentoml config reset [OPTIONS]

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

set

Set config value in local BentoML configuration file

bentoml config set [OPTIONS] [UPDATES]...

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

UPDATES

Optional argument(s)

unset

Unset config in local BentoML configuration file

bentoml config unset [OPTIONS] [UPDATES]...

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

UPDATES

Optional argument(s)

view

View local BentoML configurations

bentoml config view [OPTIONS]

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

view-effective

View effective BentoML configs, including default config values and local config overrides

bentoml config view-effective [OPTIONS]

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

delete

Delete BentoService

bentoml delete [OPTIONS] BENTO

Options

-y, --yes, --assume-yes

Automatic yes to prompts

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

deployment

Commands for manageing and operating BentoService deployments

bentoml deployment [OPTIONS] COMMAND [ARGS]...

apply

Apply BentoService deployment from yaml file

bentoml deployment apply [OPTIONS]

Options

-f, --file <deployment_yaml>

[required]

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

create

Create BentoService deployment from yaml file

bentoml deployment create [OPTIONS]

Options

-f, --file <deployment_yaml>

[required]

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

delete

Delete deployment

bentoml deployment delete [OPTIONS] NAME

Options

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “default” whichcan be changed in BentoML configuration file

--force

force delete the deployment record in database and ignore errors when deleting cloud resources

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

get

Get deployment information

bentoml deployment get [OPTIONS] NAME

Options

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-o, --output <output>
Options

json|yaml

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

list

List deployments

bentoml deployment list [OPTIONS]

Options

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-p, --platform <platform>

platform

Options

sagemaker|lambda

--limit <limit>

The maximum amount of deployments to be listed at once

-l, --labels <labels>

List deployments matching the giving labels

--order-by <order_by>
Options

created_at|name

--asc, --desc

Ascending or descending order for list deployments

-o, --output <output>
Options

json|yaml|table

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

get

Get BentoService information

bentoml get [OPTIONS] BENTO

Options

--limit <limit>

Limit how many resources will be retrieved

--ascending-order
-o, --output <output>
Options

json|yaml|table|wide

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

info

List all APIs defined in the BentoService loaded from saved bundle

bentoml info [OPTIONS] BENTO

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

lambda

Commands for AWS Lambda BentoService deployments

bentoml lambda [OPTIONS] COMMAND [ARGS]...

delete

Delete AWS Lambda deployment

bentoml lambda delete [OPTIONS] NAME

Options

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--force

force delete the deployment record in database and ignore errors when deleting cloud resources

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

deploy

Deploy BentoService to AWS Lambda

bentoml lambda deploy [OPTIONS] NAME

Options

-b, --bento, --bento-service-bundle <bento>

Target BentoService to be deployed, referenced by its name and version in format of name:version. For example: “iris_classifier:v1.2.0”

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-l, --labels <labels>

Key:value pairs that are attached to deployments and intended to be usedto specify identifying attributes of the deployments that are meaningful to users

--region <region>

AWS region name for deployment

--api-name <api_name>

User defined API function will be used for inference

--memory-size <memory_size>

Maximum Memory Capacity for AWS Lambda function, you can set the memory size in 64MB increments from 128MB to 3008MB. The default value is 1024 MB.

--timeout <timeout>

The amount of time that AWS Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

get

Get AWS Lambda deployment information

bentoml lambda get [OPTIONS] NAME

Options

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-o, --output <output>
Options

json|yaml|table

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

list

List AWS Sagemaker deployments

bentoml lambda list [OPTIONS]

Options

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--limit <limit>

The maximum amount of AWS Lambda deployments to be listed at once

-l, --labels <labels>

List deployments matching the giving labels

--order-by <order_by>
Options

created_at|name

--asc, --desc

Ascending or descending order for list deployments

-o, --output <output>
Options

json|yaml|table

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

update

Update existing AWS Lambda deployment

bentoml lambda update [OPTIONS] NAME

Options

-b, --bento, --bento-service-bundle <bento>

Target BentoService to be deployed, referenced by its name and version in format of name:version. For example: “iris_classifier:v1.2.0”

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--memory-size <memory_size>

Maximum memory capacity for AWS Lambda function in MB, you can set the memory size in 64MB increments from 128 to 3008. The default value is 1024

--timeout <timeout>

The amount of time that AWS Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

list

List BentoServices information

bentoml list [OPTIONS]

Options

--limit <limit>

Limit how many BentoServices will be retrieved

--offset <offset>

How many BentoServices will be skipped

--order-by <order_by>
Options

created_at|name

--ascending-order
-o, --output <output>
Options

json|yaml|table|wide

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

open-api-spec

Display API specification JSON in Open-API format

bentoml open-api-spec [OPTIONS] BENTO

Options

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

run

Run a API defined in saved BentoService bundle from command line

bentoml run [OPTIONS] BENTO API_NAME [RUN_ARGS]...

Options

--with-conda

Run API server in a BentoML managed Conda environment

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

API_NAME

Required argument

RUN_ARGS

Optional argument(s)

sagemaker

Commands for AWS Sagemaker BentoService deployments

bentoml sagemaker [OPTIONS] COMMAND [ARGS]...

delete

Delete AWS Sagemaker deployment

bentoml sagemaker delete [OPTIONS] NAME

Options

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--force

force delete the deployment record in database and ignore errors when deleting cloud resources

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

deploy

Deploy BentoService to AWS Sagemaker

bentoml sagemaker deploy [OPTIONS] NAME

Options

-b, --bento, --bento-service-bundle <bento>

Target BentoService to be deployed, referenced by its name and version in format of name:version. For example: “iris_classifier:v1.2.0” [required]

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-l, --labels <labels>

Key:value pairs that are attached to deployments and intended to be usedto specify identifying attributes of the deployments that are meaningful to users

--region <region>

AWS region name for deployment

--api-name <api_name>

User defined API function will be used for inference. [required]

--instance-type <instance_type>

Type of instance will be used for inference. Default to “m1.m4.xlarge”

--instance-count <instance_count>

Number of instance will be used. Default value is 1

--num-of-gunicorn-workers-per-instance <num_of_gunicorn_workers_per_instance>

Number of gunicorn worker will be used per instance. Default value for gunicorn worker is based on the instance’ cpu core counts. The formula is num_of_cpu/2 + 1

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

get

Get AWS Sagemaker deployment information

bentoml sagemaker get [OPTIONS] NAME

Options

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

-o, --output <output>
Options

json|yaml|table

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

list

List AWS Sagemaker deployment information

bentoml sagemaker list [OPTIONS]

Options

-n, --namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--limit <limit>

The maximum amount of AWS Sagemaker deployments to be listed at once

-l, --labels <labels>

List deployments matching the giving labels

--order-by <order_by>
Options

created_at|name

--asc, --desc

Ascending or descending order for list deployments

-o, --output <output>
Options

json|yaml|table

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

update

Update existing AWS Sagemaker deployment

bentoml sagemaker update [OPTIONS] NAME

Options

-b, --bento, --bento-service-bundle <bento>

Target BentoService to be deployed, referenced by its name and version in format of name:version. For example: “iris_classifier:v1.2.0”

--namespace <namespace>

Deployment namespace managed by BentoML, default value is “dev” whichcan be changed in BentoML configuration file

--instance-type <instance_type>

Type of instance will be used for inference. Default to “m1.m4.xlarge”

--instance-count <instance_count>

Number of instance will be used. Default value is 1

--num-of-gunicorn-workers-per-instance <num_of_gunicorn_workers_per_instance>

Number of gunicorn worker will be used per instance. Default value for gunicorn worker is based on the instance’ cpu core counts. The formula is num_of_cpu/2 + 1

--api-name <api_name>

User defined API function will be used for inference.

-o, --output <output>
Options

json|yaml

--wait, --no-wait

Wait for apply action to complete or encounter an error.If set to no-wait, CLI will return immediately. The default value is wait

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

NAME

Required argument

serve

Start REST API server hosting BentoService loaded from saved bundle

bentoml serve [OPTIONS] BENTO

Options

--port <port>

The port to listen on for the REST api server, default is 5000.

--with-conda

Run API server in a BentoML managed Conda environment

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BENTO

Required argument

serve-gunicorn

Start REST API server from saved BentoService bundle with gunicorn

bentoml serve-gunicorn [OPTIONS] BUNDLE_PATH

Options

-p, --port <port>
-w, --workers <workers>

Number of workers will start for the gunicorn server

--timeout <timeout>
--with-conda

Run API server in a BentoML managed Conda environment

-q, --quiet

Hide process logs and errors

--verbose, --debug

Show additional details when running command

Arguments

BUNDLE_PATH

Required argument