> 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/ko/inference/inference-cli/cloud.md).

# 클라우드에 배포

클라우드의 가상 머신에 Roboflow Inference 컨테이너를 배포할 수 있습니다. 이러한 VM은 내부적으로 CPU 또는 GPU 기반 Inference Server를 실행하도록 구성되어 있으므로, OS, GPU 드라이버 또는 Docker 설치를 직접 관리할 필요가 없습니다. 현재 Inference CLI는 Google Cloud(GCP) 또는 Amazon Cloud(AWS)에서 실행되는 가상 머신에 Roboflow Inference 컨테이너 이미지를 배포하는 것을 지원합니다.

Inference CLI는 가상 머신을 배포하려는 프로젝트에 해당하는 클라우드 CLI가 구성되어 있다고 가정합니다. 설정 지침은 다음을 참조하세요. [Google gcloud CLI](https://cloud.google.com/sdk/docs/install) 또는 [Amazon AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).

Roboflow Inference 클라우드 배포는 다음 기반으로 제공됩니다. [SkyPilot 프로젝트](https://github.com/skypilot-org/skypilot).

{% hint style="warning" %}
아래 명령을 실행하려면 다음이 설치되어 있어야 합니다. `cloud-deploy` 추가 구성요소:

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

{% endhint %}

{% hint style="success" %}
명령의 세부 정보를 보려면 다음을 실행하세요:

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

각 하위 명령에 대한 도움말 가이드도 사용할 수 있습니다:

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

{% endhint %}

## `inference cloud deploy`

AWS 또는 GCP에 GPU 또는 CPU 추론을 배포합니다:

```bash
# Roboflow Inference GPU 컨테이너를 AWS의 GPU 지원 VM에 배포
inference cloud deploy --provider aws --compute-type gpu
```

```bash
# Roboflow Inference CPU 컨테이너를 GCP의 CPU 전용 VM에 배포
inference cloud deploy --provider gcp --compute-type cpu
```

배포가 완료된 후 출력되는 "클러스터 이름"을 확인하세요. 이 핸들은 이후의 많은 명령에서 사용됩니다. 또한 deploy 명령은 VM에 대한 유용한 디버그 정보와 비용 정보를 출력합니다.

클라우드 VM에 Inference를 배포하면 다음 형식의 엔드포인트도 출력됩니다. `http://1.2.3.4:9001`; 이제 이 엔드포인트에 대해 추론을 실행할 수 있습니다.

포트 9001은 자동으로 열립니다. 클라우드나 프로젝트에서 이것이 허용되는지 보안 관리자에게 확인하세요.

## `inference cloud status`

배포 상태를 확인하려면 다음을 실행하세요:

```bash
inference cloud status
```

## 배포 중지 및 시작

다음을 사용하여 배포를 시작하고 중지할 수 있습니다:

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

및

```bash
# VM을 중지합니다. VM이 중지되어 있는 동안에는 디스크 저장소 비용만 지불하면 됩니다
inference cloud stop <deployment_handle>
```

## `inference cloud undeploy`

배포를 삭제(undeploy)하려면 다음을 실행하세요:

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

## 클라우드 배포에 SSH로 접속

다음 명령으로 클라우드 배포에 SSH로 접속할 수 있습니다:

```bash
ssh <deployment_handle>
```

필요한 SSH 키는 자동으로 다음 위치에 추가됩니다. `~/.ssh/config`; 수동으로 구성할 필요가 없습니다.

## 클라우드 배포 사용자 지정

Roboflow Inference 클라우드 배포는 내부적으로 테스트된 템플릿을 기반으로 VM을 생성합니다.

고급 사용 사례의 경우, 직접 제공하는 다음 항목을 전달하여 템플릿을 사용자 지정할 수 있습니다. [sky YAML](https://skypilot.readthedocs.io/en/latest/reference/yaml-spec.html) 명령줄 템플릿:

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

Roboflow CLI에 저장된 표준 템플릿을 다운로드한 다음 필요에 맞게 수정할 수 있습니다:

```bash
# 이 명령은 표준 gcp/cpu sky 템플릿을 출력합니다.
inference cloud deploy --dry-run --provider gcp --compute-type cpu
```

그런 다음 변경 사항을 기반으로 사용자 지정 템플릿을 배포할 수 있습니다.

다음도 사용할 수 있습니다. [sky CLI](https://skypilot.readthedocs.io/en/latest/reference/cli.html) 를 사용하여 배포를 제어하고 더 고급 기능에 접근할 수 있습니다.

Roboflow Inference 배포는 현재 AWS와 GCP를 지원합니다. 다음에서 이슈를 열어 주세요. [Inference GitHub 저장소](https://github.com/roboflow/inference/issues) 다른 클라우드 제공업체도 지원되기를 원하신다면.

{% hint style="info" %}
Roboflow가 대신 서버를 실행하고 확장해 주길 원한다면, 다음을 참조하세요 [전용 배포](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments).
{% endhint %}
