> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/reference/inference/inference-cli/cloud.md).

# Deploy to Cloud

You can deploy Roboflow Inference containers to virtual machines in the cloud. These VMs are configured to run CPU or GPU-based Inference Servers under the hood, so you don't have to deal with OS, GPU drivers, or Docker installations. The Inference CLI currently supports deploying the Roboflow Inference container images into a virtual machine running on Google Cloud (GCP) or Amazon Cloud (AWS).

The Inference CLI assumes the corresponding cloud CLI is configured for the project you want to deploy the virtual machine into. Read the instructions for setting up the [Google gcloud CLI](https://cloud.google.com/sdk/docs/install) or the [Amazon AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).

Roboflow Inference cloud deploy is powered by the [SkyPilot project](https://github.com/skypilot-org/skypilot).

{% hint style="warning" %}
To run the commands below, you need to have the `cloud-deploy` extras installed:

```bash
pip install "inference-cli[cloud-deploy]"
```

{% endhint %}

{% hint style="success" %}
To see the details of the command, run:

```bash
inference cloud --help
```

A help guide is also available for each sub-command:

```bash
inference cloud deploy --help
```

{% endhint %}

## `inference cloud deploy`

Deploy GPU or CPU inference to AWS or GCP:

```bash
# Deploy the Roboflow Inference GPU container into a GPU-enabled VM in AWS
inference cloud deploy --provider aws --compute-type gpu
```

```bash
# Deploy the Roboflow Inference CPU container into a CPU-only VM in GCP
inference cloud deploy --provider gcp --compute-type cpu
```

Note the "cluster name" printed after the deployment completes. This handle is used in many subsequent commands. The deploy command also prints helpful debug and cost information about your VM.

Deploying Inference into a cloud VM also prints out an endpoint of the form `http://1.2.3.4:9001`; you can now run inference against this endpoint.

Note that port 9001 is automatically opened. Check with your security admin if this is acceptable for your cloud or project.

## `inference cloud status`

To check the status of your deployment, run:

```bash
inference cloud status
```

## Stop and start deployments

You can start and stop your deployment using:

```bash
inference cloud start <deployment_handle>
```

and

```bash
# Stop the VM, you only pay for disk storage while the VM is stopped
inference cloud stop <deployment_handle>
```

## `inference cloud undeploy`

To delete (undeploy) your deployment, run:

```bash
inference cloud undeploy <deployment_handle>
```

## SSH into the cloud deployment

You can SSH into your cloud deployment with the following command:

```bash
ssh <deployment_handle>
```

The required SSH key is automatically added to your `~/.ssh/config`; you don't need to configure this manually.

## Cloud deploy customization

Roboflow Inference cloud deploy creates VMs based on internally tested templates.

For advanced use cases, you can customize the template by passing your own [sky YAML](https://skypilot.readthedocs.io/en/latest/reference/yaml-spec.html) template on the command line:

```bash
inference cloud deploy --custom /path/to/sky-template.yaml
```

You can download the standard template stored in the Roboflow CLI and then modify it for your needs:

```bash
# This command will print out the standard gcp/cpu sky template.
inference cloud deploy --dry-run --provider gcp --compute-type cpu
```

Then you can deploy a custom template based on your changes.

You can also use the [sky CLI](https://skypilot.readthedocs.io/en/latest/reference/cli.html) to control your deployments and access more advanced functionality.

Roboflow Inference deploy currently supports AWS and GCP. Please open an issue on the [Inference GitHub repository](https://github.com/roboflow/inference/issues) if you would like to see other cloud providers supported.

{% hint style="info" %}
If you would rather have Roboflow run and scale the servers for you, see [Dedicated Deployments](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments).
{% endhint %}
