lep deployment

Manage deployments on the Lepton AI cloud.

Deployment is a running instance of a photon. Deployments are created using the lep photon run command. Usually, a deployment exposes one or more HTTP endpoints that the users call, either via a RESTful API, or a python client defined in leptonai.client.

The deployment commands allow you to list, manage, and remove deployments on the Lepton AI cloud.

Usage

lep deployment [OPTIONS] COMMAND [ARGS]...

Options

  • --help : Show this message and exit.

Commands

  • latency : Gets the latency of a deployment.
  • list : Lists all deployments in the current workspace.
  • log : Gets the log of a deployment.
  • qps : Gets the QPS of a deployment.
  • remove : Removes a deployment.
  • status : Gets the status of a deployment.
  • update : Updates a deployment.

lep deployment list

Lists all deployments in the current workspace.

Usage

lep deployment list [OPTIONS]

Options

  • -p, --pattern TEXT : Regular expression pattern to filter deployment names.
  • --help : Show this message and exit.

lep deployment remove

Removes a deployment.

Usage

lep deployment remove [OPTIONS]

Options

  • -n, --name TEXT : The deployment name to remove. [required]
  • --help : Show this message and exit.

lep deployment status

Gets the status of a deployment.

Usage

lep deployment status [OPTIONS]

Options

  • -n, --name TEXT : The deployment name to get status. [required]
  • -t, --show-tokens : Show tokens for the deployment. Use with caution as this displays the tokens in plain text, and may be visible to others if you log the output.
  • --help : Show this message and exit.

lep deployment log

Gets the log of a deployment. If replica is not specified, the first replica is selected. Otherwise, the log of the specified replica is shown. To get the list of replicas, use lep deployment status.

Usage

lep deployment log [OPTIONS]

Options

  • -n, --name TEXT : The deployment name to get log. [required]
  • -r, --replica TEXT : The replica name to get log.
  • --help : Show this message and exit.

lep deployment update

Updates a deployment. Note that for all the update options, changes are made as replacements, and not incrementals. For example, if you specify --tokens, old tokens are replaced by the new set of tokens.

Usage

lep deployment update [OPTIONS]

Options

  • -n, --name TEXT : The deployment name to update. [required]
  • -i, --id TEXT : The new photon id to update to. Use latest for the latest id.
  • --min-replicas INTEGER : Number of replicas to update to. Pass 0 to scale the number of replicas to zero, in which case the deployemnt status page will show the deployment to be not ready until you scale it back with a positive number of replicas.
  • --resource-shape TEXT : Resource shape.
  • --public / --no-public : If --public is specified, the deployment will be made public. If --no-public is specified, the deployment will be made non-public, with access tokens being the workspace token and the tokens specified by --tokens. If neither is specified, no change will be made to the access control of the deployment.
  • --tokens TEXT : Access tokens that can be used to access the deployment. See docs for details on access control. If no tokens is specified, we will not change the tokens of the deployment. If you want to remove all additional tokens, use--remove-tokens.
  • --remove-tokens : If specified, all additional tokens will be removed, and the deployment will be either public (if --public) is specified, or only accessible with the workspace token (if --public is not specified).
  • --no-traffic-timeout INTEGER : If specified, the deployment will be scaled down to 0 replicas after the specified number of seconds without traffic. Set to 0 to explicitly change the deployment to have no timeout.
  • --help : Show this message and exit.

lep deployment qps

Gets the QPS of a deployment.

Usage

lep deployment qps [OPTIONS]

Options

  • -n, --name TEXT : The deployment name. [required]
  • -p, --by-path : Show detailed QPS info by path.
  • --help : Show this message and exit.

lep deployment latency

Gets the latency of a deployment.

Usage

lep deployment latency [OPTIONS]

Options

  • -n, --name TEXT : The deployment name. [required]
  • -p, --by-path : Show detailed QPS info by path.
  • --help : Show this message and exit.