CLI

bentoml

BentoML CLI tool

bentoml [OPTIONS] COMMAND [ARGS]...

Options

-q, --quiet

Hide process logs and only print command results

--verbose

Print verbose debugging information for BentoML developer

--version

Show the version and exit.

<API_NAME>

Run a API defined in saved BentoArchive with cli args as input

bentoml <API_NAME> [OPTIONS] API_NAME ARCHIVE_PATH

Options

--with-conda

Run API server in a BentoML managed Conda environment

Arguments

API_NAME

Required argument

ARCHIVE_PATH

Required argument

check-deployment-status

Check deployment status of BentoML archive

bentoml check-deployment-status [OPTIONS] ARCHIVE_PATH

Options

--platform <platform>

Target platform that Bento archive will be deployed to as a REST api service [required]

Options:aws-lambda|aws-lambda-py2|gcp-function|aws-sagemaker|azure-ml|algorithmia
--region <region>

Deployment’s region name inside cloud provider. [required]

--stage <stage>
--api-name <api_name>

The name of API that is deployed as a service.

Arguments

ARCHIVE_PATH

Required argument

config

Configure BentoML configurations and settings

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

reset

Reset BentoML configuration to default

bentoml config reset [OPTIONS]

set

Set value to BentoML configuration

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

Arguments

UPDATES

Optional argument(s)

unset

Unset value from BentoML configuration

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

Arguments

UPDATES

Optional argument(s)

view

View BentoML configurations

bentoml config view [OPTIONS]

view-effective

bentoml config view-effective [OPTIONS]

delete-deployment

Delete active BentoML deployment from cloud services

bentoml delete-deployment [OPTIONS] ARCHIVE_PATH

Options

--platform <platform>

The platform bento archive is deployed to [required]

Options:aws-lambda|aws-lambda-py2|gcp-function|aws-sagemaker|azure-ml|algorithmia
--region <region>

The region deployment belongs to [required]

--api-name <api_name>

Name of the API function that is deployed

--stage <stage>

Arguments

ARCHIVE_PATH

Required argument

deploy

bentoml deploy [OPTIONS] COMMAND [ARGS]...

apply

Create or update a model serving deployment

bentoml deploy apply [OPTIONS] __DEPLOYMENT_NAME

Options

--bento <bento>

Deployed bento archive, in format of name:version. For example, iris_classifier:v1.2.0 [required]

--platform <platform>

Target platform that Bento archive is going to deployed to [required]

Options:aws_lambda|gcp_function|aws_sagemaker|kubernetes|custom
--namespace <namespace>

Deployment’s namespace

--labels <labels>

Key:value pairs that attached to deployment.

--annotations <annotations>
--region <region>

Name of the deployed region. For platforms: AWS_Lambda, AWS_SageMaker, GCP_Function

--stage <stage>

Stage is to identify. For platform: AWS_Lambda, GCP_Function

--instance-type <instance_type>

Type of instance will be used for inference. For platform: AWS_SageMaker

--instance-count <instance_count>

Number of instance will be used. For platform: AWS_SageMaker

--api-name <api_name>

User defined API function will be used for inference. For platform: AWS_SageMaker

--kube-namespace <kube_namespace>

Namespace for kubernetes deployment. For platform: Kubernetes

--replicas <replicas>

Number of replicas. For platform: Kubernetes

--service-name <service_name>

Name for service. For platform: Kubernetes

--service-type <service_type>

Service Type. For platform: Kubernetes

--output <output>
Options:json|yaml
--namespace <namespace>
--all-namespace <all_namespace>

Arguments

__DEPLOYMENT_NAME

Required argument

delete

bentoml deploy delete [OPTIONS]

Options

--name <name>

Deployment name [required]

--namespace <namespace>
--all-namespace <all_namespace>

describe

bentoml deploy describe [OPTIONS]

Options

--name <name>

Deployment name [required]

--output <output>
Options:json|yaml
--namespace <namespace>
--all-namespace <all_namespace>

get

bentoml deploy get [OPTIONS]

Options

--name <name>

Deployment name [required]

--output <output>
Options:json|yaml
--namespace <namespace>
--all-namespace <all_namespace>

list

bentoml deploy list [OPTIONS]

Options

--limit <limit>

Limit how many deployments will be retrieved

--filter <filter>

Filter retrieved deployments with keywords

--labels <labels>

List deployments with the giving labels

--output <output>
Options:json|yaml
--namespace <namespace>
--all-namespace <all_namespace>

docs

Display API documents in Open API format

bentoml docs [OPTIONS] ARCHIVE_PATH

Arguments

ARCHIVE_PATH

Required argument

info

List all APIs defined in the BentoService loaded from archive.

bentoml info [OPTIONS] ARCHIVE_PATH

Arguments

ARCHIVE_PATH

Required argument

serve

Start REST API server hosting BentoService loaded from archive

bentoml serve [OPTIONS] ARCHIVE_PATH

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

Arguments

ARCHIVE_PATH

Required argument

serve-gunicorn

Start REST API gunicorn server hosting BentoService loaded from archive

bentoml serve-gunicorn [OPTIONS] ARCHIVE_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

Arguments

ARCHIVE_PATH

Required argument