> 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/deployment/ko/roboflow-cloud/batch-processing.md).

# 배치 처리

클라우드 인프라를 제공받아 대규모 이미지와 저장된 비디오 배치에 워크플로를 실행합니다.

## 개요

배치 처리는 다음을 실행하는 비용 효율적인 방법입니다. [워크플로](https://docs.roboflow.com/workflows) 이미지 배치와 저장된 동영상에 적용할 수 있습니다. 대량의 데이터를 비동기적으로 처리하는 데 적합합니다.

배치 처리는 대규모 배치를 실행하는 데 필요한 인프라를 자동으로 프로비저닝합니다.

{% hint style="info" %}
배치 처리는 Roboflow 크레딧 시스템을 이용하는 모든 워크스페이스와 Enterprise 플랜에서 사용할 수 있습니다. "Batch Processing" 탭에서 작업을 시작하거나, [에셋 라이브러리](https://docs.roboflow.com/platform/workspaces/asset-library).
{% endhint %}

Roboflow 웹 인터페이스 또는 API(CLI 사용)를 통해 배치 처리 작업을 구성할 수 있습니다.

작업을 시작하면 클라우드에 머신이 프로비저닝되어 데이터를 처리합니다. 그러면 선택한 워크플로를 데이터에 실행한 결과가 담긴 JSON 파일을 받게 됩니다.

작업은 CPU 또는 GPU 머신에서 실행됩니다. GPU 작업은 더 빠르지만 비용이 더 많이 듭니다. 자세한 내용은 [크레딧 페이지를 참조하세요.](https://roboflow.com/credits) CPU 및 GPU 요금입니다. 작업에 걸리는 시간은 처리하는 이미지 또는 동영상의 수, Workflow의 복잡도, 머신 유형에 따라 달라집니다. 일반적인 문제는 [문제 해결](https://docs.roboflow.com/deployment/ko/roboflow-cloud/batch-processing/troubleshooting.md).

다음 동영상에서 일괄 처리를 자세히 설명합니다:

{% embed url="<https://www.youtube.com/watch?v=S7K2j2IeQrM>" %}

## 웹 앱

왼쪽 사이드바에서 "배포"를 열고 "일괄 처리" 탭을 선택합니다.

<figure><img src="https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-1193fa943b014f1b279c123ad5ccc88fac10f551%2FScreenshot%202025-05-19%20at%2012.14.51.png?alt=media" alt=""><figcaption></figcaption></figure>

"새 일괄 작업"을 클릭하고 다음 단계를 따릅니다:

1. 다음을 선택합니다: [Workflow](https://docs.roboflow.com/workflows).
2. 처리할 이미지 또는 동영상을 업로드합니다.
3. CPU 또는 GPU 하드웨어를 선택합니다. 변경할 필요가 없다면 "고급 옵션"은 기본값으로 둡니다.
4. "일괄 작업 만들기"를 클릭합니다.

<figure><img src="https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-10667231b1e727c9344565e52171e0d1cb26b90c%2FScreenshot%202025-05-19%20at%2012.16.27.png?alt=media" alt=""><figcaption></figcaption></figure>

작업 목록에는 각 작업의 진행 상황이 실시간으로 표시됩니다. 이 탭에서 시작한 작업은 나만 볼 수 있는 활동 센터에도 표시됩니다. 작업을 클릭하면 세부 정보를 확인할 수 있습니다. "소스 및 유형"에는 작업이 실행된 이미지가 표시됩니다. 다음 중 하나로 확인할 수 있습니다. [에셋 라이브러리](https://docs.roboflow.com/platform/workspaces/asset-library) 이미지를 선택한 검색어(에셋 라이브러리에서 열기 링크 포함) 또는 직접 선택한 이미지 수가 표시됩니다.

### 에셋 라이브러리에서

에셋 라이브러리에서 [에셋 라이브러리](https://docs.roboflow.com/platform/workspaces/asset-library), 이미지를 선택하거나 검색 조건에 맞는 이미지를 모두 선택한 다음 "워크플로 실행"을 클릭합니다. 전체 과정과 결과를 이미지에 다시 기록하는 방법은 [워크플로 실행하기](https://docs.roboflow.com/platform/workspaces/asset-library#running-a-workflow) 에서 확인하세요.

### 에이전트에서

질문 [Roboflow 에이전트](https://docs.roboflow.com/agents/roboflow-agent) 에게 Asset Library 이미지에서 게시된 Workflow를 실행하도록 요청하세요. 직접 선택한 이미지, 검색 조건과 일치하는 이미지 또는 전체 라이브러리에서 실행할 수 있습니다. 작업 현황을 알려 달라고 할 수도 있으며, 작업이 완료되면 채팅으로 알려 줍니다. 에이전트가 시작한 작업은 백그라운드 작업에도 표시됩니다.

에이전트는 Batch Processing을 채팅 탭으로 열 수도 있습니다. 새 작업 양식에 에이전트가 합의한 Workflow와 설정을 입력하지만, 컴퓨터에서 파일을 직접 선택해야 합니다.

### 데이터 소스 미러링 시 자동 실행

다음이 [데이터 소스](https://docs.roboflow.com/datasets/create-and-upload/adding-data/datasources) 미러링될 때마다 Batch Processing 작업이 새로 가져온 이미지에 Workflow를 실행할 수 있습니다(예: 태그나 사전 라벨을 최신 상태로 유지). 의 "Workflow runs" 섹션에서 [데이터 소스](https://app.roboflow.com/settings/datasources) 페이지에서 "Add workflow run"을 클릭합니다. "Run when"에서 "On Sync"를 선택하고, 이를 트리거할 데이터 소스를 선택합니다. Workflow에는 정확히 하나의 `image` 입력.

{% hint style="info" %}
"워크플로 실행" 섹션이 보이지 않으면 배치 자동화를 관리할 수 있는 역할을 Workspace 관리자에게 요청하세요.
{% endhint %}

결과를 검색할 수 있도록 하려면 다음을 참조하세요. [결과를 Asset Library에 다시 쓰기](https://docs.roboflow.com/platform/workspaces/asset-library#writing-results-back-to-the-asset-library).

## HTTP API

**빠른 링크:**

* [데이터 수집](#ingest-data) (동영상, 단일 이미지, 이미지)
* [배치 상태 확인](#check-batch-status) (항목 수, 샤드 세부 정보)
* [작업 시작](#start-a-job)
* [작업 진행 상황 모니터링](#monitor-job-progress) (작업 상태, 단계, 태스크)
* [결과 내보내기](#export-results) (출력 파트, 다운로드 URL)
* [웹훅 알림](#webhook-notifications)

### 데이터 수집

#### 동영상 업로드

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/upload/video" method="post" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 이미지 업로드

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/upload/image" method="post" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 이미지 일괄 업로드

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/bulk-upload/image-files" method="post" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

### 배치 상태 확인

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/count" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 샤드 업로드 세부 정보 확인

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/shards" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

### 작업 시작

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/batch-processing/v1/external/{workspace}/jobs/{job\_id}" method="post" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

### 작업 진행 상황 모니터링

#### 작업 상태 가져오기

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/batch-processing/v1/external/{workspace}/jobs/{job\_id}" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 작업 단계 목록

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/batch-processing/v1/external/{workspace}/jobs/{job\_id}/stages" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 단계 태스크 목록

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/batch-processing/v1/external/{workspace}/jobs/{job\_id}/stages/{stage\_id}/tasks" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

### 결과 내보내기

#### 출력 파트 목록

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/parts" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

#### 다운로드 URL 목록

{% openapi src="/files/6aba4232adb19ec889d1ae994ff7a7ffd69b9d23" path="/data-staging/v1/external/{workspace}/batches/{batch\_id}/list" method="get" %}
[batch-processing.yaml](https://1826078061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-c01faa8d2b7705ff92e611d69a086a8d11d1c26a%2Fbatch-processing.yaml?alt=media)
{% endopenapi %}

### 웹훅 알림

상태를 폴링하는 대신 웹훅을 사용해 데이터 수집 또는 처리가 완료될 때 알림을 받을 수 있습니다. 웹훅 구성 및 페이로드 형식은 [CLI 사용법](#webhook-automation) 을 참조하세요.

## CLI

inference rf-cloud `inference rf-cloud` 를 사용해 로컬 또는 클라우드 이미지와 동영상을 준비하고 처리하세요. 이미 [에셋 라이브러리](https://docs.roboflow.com/platform/workspaces/asset-library)에 있는 이미지에는 `roboflow batch`.

### 를 사용하세요.

#### 설정

로컬 파일 또는 클라우드 파일의 경우 Inference CLI를 설치하세요:

```bash
pip install inference-cli
export ROBOFLOW_API_KEY="YOUR-API-KEY-GOES-HERE"
```

클라우드 스토리지를 지원하려면:

```bash
pip install 'inference-cli[cloud-storage]'
```

API 키를 찾는 데 도움이 필요하면 [인증 가이드](https://docs.roboflow.com/reference/authentication/authentication/find-your-roboflow-api-key).

#### 데이터 수집

**이미지**

```bash
inference rf-cloud data-staging create-batch-of-images \
  --images-dir <your-images-dir-path> \
  --batch-id <your-batch-id>
```

**동영상**

```bash
inference rf-cloud data-staging create-batch-of-videos \
  --videos-dir <your-videos-dir-path> \
  --batch-id <your-batch-id>
```

{% hint style="info" %}
배치 ID는 소문자로 입력하고, 길이는 최대 64자여야 합니다. 사용할 수 있는 문자는 영문자, 숫자, 하이픈(`-`), 밑줄(`_`).
{% endhint %}

**클라우드 스토리지**

데이터가 이미 클라우드 스토리지(S3, Google Cloud Storage 또는 Azure)에 있다면 파일을 로컬로 다운로드하지 않고 바로 처리할 수 있습니다.

이미지의 경우:

```bash
inference rf-cloud data-staging create-batch-of-images \
  --data-source cloud-storage \
  --bucket-path <cloud-path> \
  --batch-id <your-batch-id>
```

동영상의 경우:

```bash
inference rf-cloud data-staging create-batch-of-videos \
  --data-source cloud-storage \
  --bucket-path <cloud-path> \
  --batch-id <your-batch-id>
```

다음 `--bucket-path` 매개변수는 다음 제공자를 지원합니다. 글로브 패턴은 수집할 파일을 필터링합니다:

<table data-search="false"><thead><tr><th>제공자</th><th>경로 형식</th><th>글로브 예시</th></tr></thead><tbody><tr><td>S3</td><td><code>s3://bucket-name/path/</code></td><td><code>s3://my-bucket/training-data/**/*.jpg</code>: 하위 디렉터리를 포함한 모든 JPG 파일</td></tr><tr><td>Google Cloud Storage</td><td><code>gs://bucket-name/path/</code></td><td><code>gs://my-bucket/videos/2024-*/*.mp4</code>:  <code>2024-*</code> 폴더의 MP4 파일</td></tr><tr><td>Azure Blob Storage</td><td><code>az://container-name/path/</code></td><td><code>az://container/images/*.png</code>: images 폴더의 PNG 파일</td></tr></tbody></table>

{% hint style="info" %}
클라우드 스토리지 자격 증명은 CLI에서 프리사인 URL을 생성하는 데 로컬에서만 사용됩니다. Roboflow 서버로 업로드되지 않습니다.
{% endhint %}

{% hint style="warning" %}
생성된 사전 서명 URL은 24시간 동안 유효합니다. 배치 처리 작업이 이 시간 내에 완료되도록 하세요.
{% endhint %}

대용량 데이터 세트의 경우 시스템이 이미지를 각각 20,000개 파일로 구성된 청크로 자동 분할합니다. 동영상은 1,000개 미만으로 배치하는 것이 가장 좋습니다.

**서명된 URL 수집**

고급 자동화를 위해 로컬 파일 대신 서명된 URL을 통해 데이터를 수집할 수 있습니다.

<table data-search="false"><thead><tr><th>플래그</th><th>설명</th></tr></thead><tbody><tr><td><code>--data-source references-file</code></td><td>서명된 URL로 참조된 파일을 처리합니다.</td></tr><tr><td><code>--references &#x3C;path_or_url></code></td><td>파일 URL이 포함된 JSONL 파일의 경로 또는 해당 파일을 가리키는 서명된 URL입니다.</td></tr></tbody></table>

참조 파일은 다음을 사용합니다 `JSONL`:

```
{"name": "<unique-file-name-1>", "url": "https://<signed-url>"}
{"name": "<unique-file-name-2>", "url": "https://<signed-url>"}
```

{% hint style="info" %}
서명된 URL을 통한 수집 기능은 Enterprise 및 이전 Growth 요금제에서 사용할 수 있습니다.
{% endhint %}

#### 스테이징된 데이터 검사

```bash
inference rf-cloud data-staging show-batch-details --batch-id <your-batch-id>
```

#### 작업 시작

**이미지 처리**

```bash
inference rf-cloud batch-processing process-images-with-workflow \
  --workflow-id <workflow-id> \
  --batch-id <batch-id> \
  --machine-type gpu
```

**동영상 처리**

```bash
inference rf-cloud batch-processing process-videos-with-workflow \
  --workflow-id <workflow-id> \
  --batch-id <batch-id> \
  --machine-type gpu \
  --max-video-fps <your-desired-fps>
```

{% hint style="info" %}
Workflow ID를 찾으려면 Roboflow 앱에서 Workflow Editor를 열고 "Deploy"를 클릭한 다음, 코드 스니펫에서 식별자를 확인하세요.
{% endhint %}

{% hint style="info" %}
기본적으로 처리는 CPU에서 실행됩니다. 여러 개의 모델이나 대형 모델을 사용하는 Workflow에는 `--machine-type gpu` 를 사용하세요.
{% endhint %}

#### 작업 진행 상황 모니터링

시작 명령은 작업 ID를 출력합니다. 이 ID를 사용해 상태를 확인하세요:

```bash
inference rf-cloud batch-processing show-job-details --job-id <your-job-id>
```

#### 결과 내보내기

작업 세부 정보에 출력 배치 ID가 포함됩니다. 이 ID를 사용해 결과를 내보내세요:

```bash
inference rf-cloud data-staging export-batch \
  --target-dir <dir-to-export-result> \
  --batch-id <output-batch-of-a-job>
```

#### 웹후크 자동화

상태를 폴링하는 대신 웹후크를 사용하면 수집 또는 처리가 완료될 때 알림을 받을 수 있습니다.

**데이터 수집 웹후크**

CLI 명령어 `create-batch-of-images` 및 `create-batch-of-videos` 은 다음 옵션을 지원합니다:

<table data-search="false"><thead><tr><th>플래그</th><th>설명</th></tr></thead><tbody><tr><td><code>--notifications-url &#x3C;webhook_url></code></td><td>알림을 받을 웹후크 엔드포인트입니다.</td></tr><tr><td><code>--notification-category ingest-status</code></td><td>전체 데이터 수집 프로세스 상태입니다. 기본값입니다.</td></tr><tr><td><code>--notification-category files-status</code></td><td>개별 파일 처리 상태입니다.</td></tr></tbody></table>

알림은 다음을 포함하는 HTTP POST로 전송됩니다: `Authorization` 헤더에는 Roboflow 게시 가능 키가 포함됩니다.

**수집 상태 알림**

```json
{
    "type": "roboflow-data-staging-notification-v1",
    "event_id": "8c20f970-fe10-41e1-9ef2-e057c63c07ff",
    "ingest_id": "8cd48813430f2be70b492db67e07cc86",
    "batch_id": "test-batch-117",
    "shard_id": null,
    "notification": {
        "type": "ingest-status-notification-v1",
        "success": false,
        "error_details": {
            "type": "unsafe-url-detected",
            "reason": "Untrusted domain found: https://example.com/image.png"
        }
    },
    "delivery_attempt": 1
}
```

**파일 상태 알림**

```json
{
    "type": "roboflow-data-staging-notification-v1",
    "event_id": "8f42708b-aeb7-4b73-9d83-cf18518b6d81",
    "ingest_id": "d5cb69aa-b2d1-4202-a1c1-0231f180bda9",
    "batch_id": "prod-batch-1",
    "shard_id": "0d40fa12-349e-439f-83f8-42b9b7987b33",
    "notification": {
        "type": "ingest-files-status-notification-v1",
        "success": true,
        "ingested_files": [
            "000000494869.jpg",
            "000000186042.jpg"
        ],
        "failed_files": [
            {
                "type": "file-size-limit-exceeded",
                "file_name": "big_image.png",
                "reason": "Max size of single image is 20971520B."
            }
        ],
        "content_truncated": false
    },
    "delivery_attempt": 1
}
```

**작업 완료 웹후크**

추가 `--notifications-url` 작업을 시작할 때:

```bash
inference rf-cloud batch-processing process-images-with-workflow \
  --workflow-id <workflow-id> \
  --batch-id <batch-id> \
  --notifications-url <webhook_url>
```

**작업 완료 알림**

```json
{
  "type": "roboflow-batch-job-notification-v1",
  "event_id": "8f42708b-aeb7-4b73-9d83-cf18518b6d81",
  "job_id": "<your-batch-job-id>",
  "job_state": "success | fail",
  "delivery_attempt": 1
}
```

#### 클라우드 스토리지 인증

**AWS S3 및 S3 호환 스토리지**

자격 증명은 다음 위치에서 자동으로 검색됩니다:

1. 환경 변수:

```bash
export AWS_ACCESS_KEY_ID=your-access-key-id
export AWS_SECRET_ACCESS_KEY=your-secret-access-key
export AWS_SESSION_TOKEN=your-session-token  # Optional
```

2. AWS 자격 증명 파일(`~/.aws/credentials`, `~/.aws/config`)
3. IAM 역할(EC2, ECS, Lambda)

이름이 지정된 프로필:

```bash
export AWS_PROFILE=production
```

S3 호환 서비스(예: Cloudflare R2, MinIO)의 경우:

```bash
export AWS_ENDPOINT_URL=https://account-id.r2.cloudflarestorage.com
export AWS_REGION=auto  # R2 requires region='auto'
export AWS_ACCESS_KEY_ID=your-r2-access-key
export AWS_SECRET_ACCESS_KEY=your-r2-secret-key
```

**Google Cloud Storage**

자격 증명은 다음 위치에서 검색됩니다:

1. 서비스 계정 키 파일(자동화에 권장):

```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
```

2. gcloud CLI의 사용자 자격 증명(`gcloud auth login`)
3. GCP 메타데이터 서비스(Google Cloud Platform에서 실행 중인 경우)

**Azure Blob Storage**

SAS 토큰(권장):

```bash
export AZURE_STORAGE_ACCOUNT_NAME=mystorageaccount
export AZURE_STORAGE_SAS_TOKEN="YOUR_SAS_TOKEN"
```

계정 키:

```bash
export AZURE_STORAGE_ACCOUNT_NAME=mystorageaccount
export AZURE_STORAGE_ACCOUNT_KEY=your-account-key
```

Azure CLI를 사용해 SAS 토큰을 생성합니다. 다음을 `<expiry-utc>` 미래의 UTC 시간으로 바꾸고 `YYYY-MM-DDTHH:MMZ` 형식을 사용합니다:

```bash
az storage container generate-sas \
  --account-name mystorageaccount \
  --name my-container \
  --permissions rl \
  --expiry <expiry-utc>
```

**사용자 지정 스크립트**

고급 사용 사례에서는 서명된 URL 파일을 생성하는 참조 스크립트를 확인하세요:

* AWS S3: [generateS3SignedUrls.sh](https://raw.githubusercontent.com/roboflow/roboflow-python/main/scripts/generateS3SignedUrls.sh)
* Google Cloud Storage: [generateGCSSignedUrls.sh](https://raw.githubusercontent.com/roboflow/roboflow-python/main/scripts/generateGCSSignedUrls.sh)
* Azure Blob Storage: [generateAzureSasUrls.sh](https://raw.githubusercontent.com/roboflow/roboflow-python/main/scripts/generateAzureSasUrls.sh)

#### 모든 옵션 살펴보기

```bash
inference rf-cloud --help
inference rf-cloud data-staging --help
inference rf-cloud batch-processing --help
```

### 에셋 라이브러리 이미지

바꾸기 `<workspace-url>` 을(를) 워크스페이스 슬러그로 바꿉니다(예: `my-workspace`). image 입력이 하나 있는 게시된 워크플로를 선택합니다. 기타 필수 입력에는 기본값을 지정하되, 배치 처리에서 이미지마다 채우는 `image` 입력은 제외합니다. 배치 처리에서 이미지마다 채우는 `source_id`는 예외입니다.

Roboflow CLI를 [설치하거나 업데이트한 다음](https://docs.roboflow.com/reference/platform/cli)로그인하고 워크플로 목록을 확인합니다:

```bash
pip install --upgrade roboflow
roboflow auth login
roboflow --workspace <workspace-url> --json workflow list
```

게시된 워크플로의 JSON 출력에서 `id` 를 사용합니다. 처리할 이미지를 [RoboQL](https://docs.roboflow.com/platform/workspaces/asset-library) 검색으로 찾습니다:

```bash
roboflow --workspace <workspace-url> --json image search "tag:night-shift" \
  --fields id,filename
```

검색 결과의 이미지 ID를 `--image-ids`:

```bash
roboflow --workspace <workspace-url> batch create \
  --workflow <workflow-id> \
  --image-ids <image-id-1>,<image-id-2>
```

구조화된 필터와 일치하는 모든 이미지를 처리하려면 `--image-ids` 를 `--query "tag:night-shift"`로 바꿉니다. 에셋 라이브러리 전체를 처리하려면 `--all` 을 사용합니다. 선택 옵션은 정확히 하나만 선택합니다.

생성 응답에는 `taskId`, `jobId`및 `requestId`가 포함됩니다. 작업이 완료될 때까지 기다리려면 태스크 ID를 사용하고, 작업을 확인하려면 작업 ID를 사용합니다:

```bash
roboflow --workspace <workspace-url> asynctasks wait <task-id>
roboflow --workspace <workspace-url> batch status <job-id>
roboflow --workspace <workspace-url> batch list
```

{% hint style="info" %}
터미널을 닫거나 대기 명령이 시간 초과되더라도 작업은 계속 실행됩니다. 네트워크 오류가 발생하면 동일한 옵션으로 다시 시도하세요. 중복 작업이 생성되지 않도록 `requestId` 값을 응답 또는 오류 안내에서 가져와 `--request-id <request-id>` 로 전달하세요.
{% endhint %}

작업을 중지하려면 `batch abort <job-id>` 를 사용하고, 기존 구성으로 다시 시도하려면 `batch restart <job-id>` 를 사용하세요. 두 명령 모두 확인을 요청하므로 스크립트에서 사용하려면 `--yes` 를 추가하세요. 작업을 다시 시작하면 크레딧이 소모될 수 있습니다.
