# 오프라인 모드

{% hint style="info" %}
Roboflow Enterprise 고객을 위한 Offline Mode를 사용하려면 Docker 컨테이너를 사용해야 합니다.
{% endhint %}

Roboflow Enterprise 고객은 온디바이스 inference 서버인 Roboflow Inference를 구성하여 최대 30일 동안 weights를 캐시할 수 있습니다.

이를 통해 모델을 완전히 air-gapped 환경이나 인터넷 연결을 쉽게 사용할 수 없는 장소에서도 실행할 수 있습니다.

모델을 offline으로 실행하려면 다음이 필요합니다:

1. Docker volume을 생성하고 연결하여 `/tmp/cache` 를 Inference Server에 마운트합니다.
2. Docker로 Roboflow Inference 서버를 시작합니다.
3. 서버를 통해 모델에 요청을 보내면 모델 weight 다운로드 및 캐시 프로세스가 시작됩니다. 이 단계에는 인터넷 연결이 필요합니다.

weights가 캐시되면 로컬에서 사용할 수 있습니다.

아래에서는 CPU부터 GPU까지 다양한 디바이스 유형에서 모델을 offline으로 실행하는 방법을 안내합니다.

## CPU

이미지: [roboflow / roboflow-inference-server-cpu](https://hub.docker.com/r/roboflow/roboflow-inference-server-cpu)

```bash
sudo docker volume create roboflow
sudo docker run --net=host --env LICENSE_SERVER=10.0.1.1 --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-cpu
```

## GPU

GPU 컨테이너를 사용하려면 먼저 다음을 설치해야 합니다. [nvidia-container-runtime](https://github.com/NVIDIA/nvidia-container-runtime).

이미지:[ roboflow / roboflow-inference-server-gpu](https://hub.docker.com/r/roboflow/roboflow-inference-server-gpu)

```bash
sudo docker volume create roboflow
docker run -it --rm -p 9001:9001 --gpus all --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-gpu
```

## Jetson 4.5

Jetson Jetpack 4.5에는 이미 다음이 설치되어 있습니다. <https://github.com/NVIDIA/nvidia-container-runtime> 이

이미지:[ roboflow/roboflow-inference-server-jetson-4.5.0](https://hub.docker.com/r/roboflow/roboflow-inference-server-jetson-4.5.0)

<pre class="language-bash"><code class="lang-bash">sudo docker volume create roboflow
<strong>docker run -it --rm -p 9001:9001 --runtime=nvidia --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-jetson-4.5.0
</strong></code></pre>

## Jetson 4.6

Jetson Jetpack 4.6에는 이미 다음이 설치되어 있습니다. <https://github.com/NVIDIA/nvidia-container-runtime> 이

이미지:[ roboflow/roboflow-inference-server-jetson-4.6.1](https://hub.docker.com/r/roboflow/roboflow-inference-server-jetson-4.6.1/tags)

<pre class="language-bash"><code class="lang-bash">sudo docker volume create roboflow
<strong>docker run -it --rm -p 9001:9001 --runtime=nvidia --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-jetson-4.6.1
</strong></code></pre>

## Jetson 5.1

Jetson Jetpack 5.1에는 이미 다음이 설치되어 있습니다. <https://github.com/NVIDIA/nvidia-container-runtime> 이

이미지: [roboflow/roboflow-inference-server-jetson-5.1.1](https://hub.docker.com/r/roboflow/roboflow-inference-server-jetson-5.1.1)

```bash
sudo docker volume create roboflow
docker run -it --rm -p 9001:9001 --runtime=nvidia --mount source=roboflow,target=/tmp/cache roboflow/roboflow-inference-server-jetson-5.1.1
```

## Inference 실행

로컬 캐싱으로 설정된 Inference server를 사용하면 인터넷 연결 없이 이미지와 비디오 프레임에서 모델을 실행할 수 있습니다.

"[HTTP를 통해 이미지에서 예측하기](https://inference.roboflow.com/quickstart/run_model_on_image/)" Inference 문서를 참조하여 모델 실행 방법을 확인하세요.

## Inference 결과

weights는 SSL 암호화를 통해 인터넷으로 Roboflow 계정에서 로드되며(구성한 경우 License Server를 통해) Docker volume에 최대 30일 동안 안전하게 저장됩니다.

inference 결과에는 새 `expiration` 키가 포함되며, 이를 사용해 Internet 또는 License Server 연결을 통해 weights의 사용권을 갱신하기 전까지 Inference Server가 예측을 계속 제공할 수 있는 기간을 확인할 수 있습니다. weight 만료일이 7일 미만으로 떨어지면 Inference Server는 Roboflow API에 성공적으로 연결될 때까지 1시간에 한 번씩 weights의 사용권 갱신을 시도하기 시작합니다.

사용권이 갱신되면 카운터는 30일로 재설정됩니다.

```json
{
    "predictions": [
        {
            "x": 340.9,
            "y": 263.6,
            "width": 284,
            "height": 360,
            "class": "example",
            "confidence": 0.867
        }
    ],
    "expiration": {
        "value": 29.91251408564815,
        "unit": "days"
    }
}
```

{% hint style="info" %}
모델을 offline으로 배포하는 것에 대해 궁금한 점이 있으면 Roboflow 담당자에게 문의하여 안내를 받으세요.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/enterprise-deployment/offline-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
