Skip to main content

modelbit deployment {action}

Manage deployments in your Modelbit workspace.

Parameters

  • {action}: Can be one of create or restart
  • --branch or -b: Optional[str] Sets the git branch for the command. If run from outside of a Modelbit git directory the default value is main. If run from within a Modelbit git directory then the current branch is used.

Additional parameters are documented within each action:

create

Creates a simple deployment (including a source.py, metadata.yaml, and requirements.txt) in the current Modelbit git repo.

The following parameters are supported:

  • --name or -n: str Name of the deployment to create

Examples

Create a new deployment named example_deployment

modelbit deployment create --name example_deployment

See also

restart

Deployments can be restarted to ensure their initialization code (e.g. imports and code outside the inference function) are re-executed.

The following parameters are supported:

  • --name or -n: str Name of the deployment to restart
  • --version or -v: Optional[int|'latest'] The version to restart. The version can be the integer version of the deployment, or latest. If no version is specified then latest is used.

Examples

Restart the latest version of a deployment

modelbit deployment restart --name example_deployment

Restart a specific version on a branch

modelbit deployment restart --name example_deployment --version 5 --branch dev

See also