> 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/ja/serufuhosuto/inference-server.md).

# Inference サーバー

Inference Server とは何か、Docker と Inference CLI での起動方法、内蔵の JupyterLab ノートブックの開き方。

Inference Server は、ラップするスタンドアロンのマイクロサービスです [`inference` Python パッケージ](/deployment/ja/serufuhosuto/inference-library.md)。画像用の HTTP エンドポイントと、動画ストリーム用の WebRTC エンドポイントを公開します。1 つのサーバーで複数のクライアントにサービスを提供し、同じモデルと [Workflows](https://docs.roboflow.com/workflows) Roboflow のホスト型 API と同様に動作します。セルフホストの推奨方法です。詳細は [パスを選択](/deployment/ja/serufuhosuto/self-hosted.md#pick-a-path) ライブラリを直接実行する場合との比較について。

## 実行場所

ご自身のハードウェア（Raspberry Pi、NVIDIA GPU、NVIDIA Jetson、または通常のサーバー）に、 [Docker](/deployment/ja/serufuhosuto/inference-server/install.md)で、または [ご自身の AWS、GCP、または Azure アカウント](/deployment/ja/serufuhosuto/inference-server/install/cloud.md)上でサーバーをセルフホストできます。Roboflow も同じサーバーを、 [Serverless Cloud API](/deployment/ja/roboflow-cloud/serverless-api.md) と [専用デプロイ](/deployment/ja/roboflow-cloud/dedicated-deployments.md)：詳細は [デプロイオプションの選択](/deployment/ja/choosing-a-deployment.md).

どちらを選んでも、次のものを通してやり取りします [Inference SDK](https://docs.roboflow.com/reference/inference/inference-sdk)、同じインターフェースを共有しているためです。変わるのは `api_url` だけです。

## Docker で実行する

始める前に、 [Docker がインストールされている](https://www.docker.com/get-started) ことを確認してください。Inference Server を起動する最も簡単な方法は、次のコマンドです [Inference CLI](https://docs.roboflow.com/reference/inference/inference-cli):

```bash
pip install inference-cli && inference server start
```

これにより、適切な Docker イメージが取得され、既定で 9001 ポートが公開されます。 `127.0.0.1` 既定では。Jetson イメージと `--tunnel` は起動時に公開します `0.0.0.0`；詳細は [サーバーのセキュリティ](/deployment/ja/serufuhosuto/inference-server/configuration/security.md#restrict-network-access) リモートクライアントを許可する前に確認してください。

次のコマンドでサーバーの状態を確認します：

```bash
inference server status
```

## Docker コンテナを手動で設定する

`inference server start` は `docker run` 内部では、推奨のセキュリティ設定、キャッシュ、プラットフォーム固有のオプション付きで実行されます。

ご自身でコンテナを起動したい場合は、お使いのプラットフォームのインストールガイドの「コンテナを手動で起動する」セクションを参照してください：

* [Linux](/deployment/ja/serufuhosuto/inference-server/install/linux.md#manually-starting-the-container)
* [Windows](/deployment/ja/serufuhosuto/inference-server/install/windows.md#manually-starting-the-container)
* [Mac](/deployment/ja/serufuhosuto/inference-server/install/mac.md#using-docker)
* [Jetson](/deployment/ja/serufuhosuto/inference-server/install/jetson.md#manually-starting-the-container)
* [Raspberry Pi](/deployment/ja/serufuhosuto/inference-server/install/raspberry-pi.md#manually-starting-the-container)

コンテナ設定は環境変数で制御されます：次を参照してください [Docker の設定オプション](/deployment/ja/serufuhosuto/inference-server/configuration/docker-configuration.md) および完全な [環境変数リファレンス](/deployment/ja/serufuhosuto/inference-server/configuration/environment-variables.md).

## 内蔵 JupyterLab ノートブック

Inference Server には内蔵の JupyterLab 環境が付属しており、開発やテスト中に試す最速の方法です。既定では無効になっているため、サーバーを次のオプション付きで起動してください： `--dev` それを有効にするフラグです：

```bash
pip install inference-cli
inference server start --dev
```

次に開き `http://localhost:9001` ブラウザで Inference のランディングページを表示すると、リソース、例、内蔵 JupyterLab 環境へのリンクがあります。「Jump Into an Inference Enabled Notebook」を選択すると、JupyterLab が新しいタブで開きます。サンプルノートブックと、Inference を実行するために必要なすべての依存関係があらかじめ読み込まれています。

{% hint style="warning" %}
この `--dev` このノートブック環境はローカル開発向けです。信頼できないネットワークから到達可能なサーバーでは有効にしないでください：次を参照してください [セルフホストサーバーの保護](/deployment/ja/serufuhosuto/inference-server/configuration/security.md).
{% endhint %}

## 動画をストリーミングする

Inference SDK の WebRTC クライアントを使用して、ウェブカメラ、カメラ入力、動画ファイルをモデルまたは Workflow を通してストリーミングします：

```bash
pip install "inference-sdk[webrtc]"
```

次を設定します `api_url="http://localhost:9001"` 作成するとき `InferenceHTTPClient`です。参照: [WebRTC ストリーミング](https://docs.roboflow.com/reference/inference/inference-sdk/webrtc) モデルおよび Workflow の例については、次を参照するか、 [Workflows によるビデオ処理](https://docs.roboflow.com/workflows/deploy/video-processing) タスクベースのガイドについては次を参照してください。

## このセクション

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Inference Server をインストールする</strong></td><td>要件、デバイス別のインストールガイド、ご自身のクラウド、更新方法。</td><td><a href="/deployment/ja/serufuhosuto/inference-server/install.md">Inference Server をインストール</a></td></tr><tr><td><strong>モデルを実行する</strong></td><td>HTTP による最初のリクエスト、モデル ID、可視化。</td><td><a href="/deployment/ja/serufuhosuto/self-hosted.md">セルフホスト型デプロイメント</a></td></tr><tr><td><strong>設定</strong></td><td>コンテナオプション、環境変数、セキュリティ、HTTPS、およびテレメトリ。</td><td><a href="/deployment/ja/serufuhosuto/inference-server/configuration.md">構成</a></td></tr><tr><td><strong>アーキテクチャ</strong></td><td>リクエスト、動画、Workflows がサーバーをどのように流れるか。</td><td><a href="/deployment/ja/serufuhosuto/inference-server/architecture.md">Inference アーキテクチャ</a></td></tr></tbody></table>
