Deployment
Deploy autoscaling inference APIs.
Usage:
lightning deployment [OPTIONS] COMMAND [ARGS]...Commands
Command |
Description |
|---|---|
Create a deployment. |
|
Delete a deployment. |
|
Manage Deployment environment variables. |
|
Inspect a deployment as JSON. |
|
List deployments in a teamspace. |
|
View the logs for a deployment. |
|
Reload weights on a running BYOM deployment. |
|
Manage Deployment secret references. |
|
Update a deployment. |
lightning deployment create
Create a deployment.
Usage:
lightning deployment create [OPTIONS] [NAME]Arguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
no |
Optional deployment name. Lightning generates one if omitted. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
The deployment name. Overrides the optional NAME argument. |
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
|
no |
|
Docker image to deploy. Mutually exclusive with –studio. |
|
|
no |
|
Studio to deploy from. Mutually exclusive with –image. |
|
|
no |
|
The machine type to run replicas on. |
|
|
no |
|
Port to expose. Can be repeated. |
|
|
no |
|
Container command. |
|
|
no |
|
Container entrypoint. Omit to use the image default. |
|
|
no |
|
Fixed number of replicas to start. |
|
|
no |
|
Minimum autoscaling replicas. |
|
|
no |
|
Maximum autoscaling replicas. |
|
|
no |
|
Autoscaling metric. |
|
|
no |
|
Autoscaling threshold. |
|
|
no |
|
Cloud provider or cloud account to run replicas on. |
|
|
no |
|
Environment variable in KEY=VALUE or JSON format. |
|
|
no |
|
Secret to expose as an environment variable. Use SECRET to inject under the secret name, or ENV_NAME=SECRET to inject under a different env var name. |
|
— |
no |
— |
Whether to use interruptible instances. |
|
|
no |
|
Number of machines per replica. |
|
— |
no |
— |
Inject SDK credentials. |
|
|
no |
|
Custom domain to attach to the deployment. |
|
|
no |
|
Require basic auth on the endpoint, in USERNAME:PASSWORD format. |
|
|
no |
|
Require bearer token auth on the endpoint. |
|
|
no |
|
Map a container path to a data connection path. Can be repeated. |
|
|
no |
|
Comma-separated path mappings. |
|
|
no |
|
Maximum machine allocation duration in seconds. |
|
|
no |
|
HuggingFace model id to serve. Mutually exclusive with –image/–studio. |
|
|
no |
|
Name of the Lightning secret holding your HuggingFace token (gated/private models). |
|
|
no |
|
vLLM serving image variant. Defaults to ‘stable’. |
|
|
no |
|
vLLM tensor-parallel size. |
|
|
no |
|
Maximum model context length. |
|
|
no |
|
Fraction of GPU memory vLLM may use (0-1). |
|
|
no |
|
Quantization method (e.g. fp8, awq). |
|
|
no |
|
Model weight dtype (e.g. bfloat16). |
|
|
no |
|
Extra raw vLLM arg, repeatable (e.g. –vllm-arg –enable-chunked-prefill). |
|
— |
no |
— |
Enable hot weight reload (HuggingFace auto-detect + user-triggered) without redeploying. |
|
|
no |
|
Acknowledge a model validation warning by code (repeatable). |
|
— |
no |
— |
Acknowledge all model validation warnings and deploy anyway. |
|
— |
no |
— |
Print the resolved model configuration without creating the deployment. |
|
— |
no |
— |
Output the created deployment as JSON. |
lightning deployment delete
Delete a deployment.
Usage:
lightning deployment delete [OPTIONS] NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
Deployment name to delete. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
— |
no |
— |
Delete without prompting for confirmation. |
lightning deployment env
Manage Deployment environment variables.
Usage:
lightning deployment env [OPTIONS] COMMAND [ARGS]...Commands
Command |
Description |
|---|---|
Delete one directly configured Deployment environment variable. |
|
List directly configured Deployment environment variables. |
|
Set one Deployment environment variable from KEY=VALUE. |
lightning deployment env delete
Delete one directly configured Deployment environment variable.
Usage:
lightning deployment env delete [OPTIONS] KEYArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
No description provided. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment env list
List directly configured Deployment environment variables.
Usage:
lightning deployment env list [OPTIONS]Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment env set
Set one Deployment environment variable from KEY=VALUE.
Usage:
lightning deployment env set [OPTIONS] ASSIGNMENTArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
No description provided. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment inspect
Inspect a deployment as JSON.
Usage:
lightning deployment inspect [OPTIONS] NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
Deployment name to inspect. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
— |
no |
— |
Include jobs for this deployment. |
|
— |
no |
— |
Output as JSON (inspect always emits JSON). |
lightning deployment list
List deployments in a teamspace.
Usage:
lightning deployment list [OPTIONS]Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
— |
no |
— |
List deployments in all teamspaces visible to the selected owner. |
|
|
no |
— |
The attribute to sort deployments by. |
|
— |
no |
— |
Output as JSON. |
lightning deployment logs
View the logs for a deployment.
Usage:
lightning deployment logs [OPTIONS] [COMMAND] [ARGS]...Commands
Command |
Description |
|---|---|
Download the complete logs for a deployment replica. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
|
no |
|
Specific deployment job ID. Can be repeated. |
|
|
no |
|
Only include lines at or after this time (e.g. “2h”, RFC3339). |
|
|
no |
|
Only include lines at or before this time (e.g. “30m”, RFC3339). |
|
|
no |
|
Only include lines containing every whitespace-separated term. |
|
|
no |
|
Only include lines at or above this severity. |
|
|
no |
|
Machine (0-based) to read within a multi-machine replica. |
|
— |
no |
— |
Stream new log lines as they are produced. |
|
|
no |
|
Only show the last N lines. Defaults to 100. |
|
— |
no |
— |
Prepend each line with its ISO-8601 timestamp. |
|
— |
no |
— |
Output entries as a JSON array. |
|
— |
no |
— |
Launch the interactive TUI log viewer. |
lightning deployment logs download
Download the complete logs for a deployment replica.
Usage:
lightning deployment logs download [OPTIONS] NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
No description provided. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
|
no |
|
Specific deployment job ID. Can be repeated. |
|
— |
no |
— |
Prepend each line with its ISO-8601 timestamp. |
lightning deployment reload-weights
Reload weights on a running BYOM deployment.
Usage:
lightning deployment reload-weights [OPTIONS] NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
Deployment name whose weights should be reloaded. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
lightning deployment secret
Manage Deployment secret references.
Usage:
lightning deployment secret [OPTIONS] COMMAND [ARGS]...Commands
Command |
Description |
|---|---|
Remove a teamspace secret reference by its injected environment variable name. |
|
List teamspace secrets referenced by the Deployment. |
|
Reference a teamspace secret. |
lightning deployment secret delete
Remove a teamspace secret reference by its injected environment variable name.
Usage:
lightning deployment secret delete [OPTIONS] ENV_NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
No description provided. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment secret list
List teamspace secrets referenced by the Deployment.
Usage:
lightning deployment secret list [OPTIONS]Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment secret set
Reference a teamspace secret. Use SECRET, or ENV_NAME=SECRET to inject under a different env var name.
Usage:
lightning deployment secret set [OPTIONS] ASSIGNMENTArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
No description provided. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
|
Deployment name. |
|
|
no |
— |
The teamspace to use, as a bare name or an ‘owner/teamspace’ slug. Defaults to the current teamspace. |
|
|
no |
— |
The organization owning the teamspace (if any). Defaults to the current organization.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
|
no |
— |
The user owning the teamspace (if any). Defaults to the current user.(DEPRECATED: Pass the owner as part of –teamspace instead, e.g. ‘–teamspace owner/teamspace’. This option will be removed in a future release.) |
|
— |
no |
— |
Output as JSON. |
lightning deployment update
Update a deployment.
Usage:
lightning deployment update [OPTIONS] NAMEArguments
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
yes |
Deployment name to update. |
Options
Option |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
|
Override default teamspace (format: owner/teamspace). |
|
|
no |
|
Rename the deployment. |
|
|
no |
|
New docker image. |
|
|
no |
|
New machine type for replicas. |
|
|
no |
|
New container command. |
|
|
no |
|
New container entrypoint. |
|
|
no |
|
New fixed replica count. |
|
|
no |
|
New minimum autoscaling replicas. |
|
|
no |
|
New maximum autoscaling replicas. |
|
|
no |
|
Replacement exposed port. Can be repeated. |
|
|
no |
|
New cloud provider or cloud account to run replicas on. |
|
|
no |
|
Replacement env var in KEY=VALUE or JSON format. |
|
|
no |
|
Replacement secret to expose as an environment variable. Use SECRET to inject under the secret name, or ENV_NAME=SECRET to inject under a different env var name. |
|
— |
no |
— |
Whether to use interruptible instances. |
|
|
no |
|
New number of machines per replica. |
|
— |
no |
— |
Inject SDK credentials. |
|
|
no |
|
New custom domain. |
|
|
no |
|
Require basic auth on the endpoint, in USERNAME:PASSWORD format. |
|
|
no |
|
Require bearer token auth on the endpoint. |
|
|
no |
|
Replacement path mapping. Can be repeated. |
|
|
no |
|
Comma-separated replacement path mappings. |
|
|
no |
|
New maximum machine allocation duration in seconds. |
|
|
no |
|
Rolling update max surge. |
|
|
no |
|
Rolling update max unavailable. |
Was this page helpful?
Thanks for the feedback.