For the complete documentation index, see llms.txt. This page is also available as Markdown.

Docker Compose

Roboflow inference server を他の docker コンテナと並行して実行し、Docker Compose を使ってマルチコンテナアプリケーションを構築します。

Roboflow inference コンテナと並行して他の docker コンテナを実行したい場合は、次を使用できます Docker Compose。以下の example docker-compose.yaml ファイルでこれを示します:

# roboflow Inference Service を Docker compose サービスとして実行する"
services:
  roboflow-inference-service:
    image: roboflow/inference-server:cpu
    ports:
      - "9001:9001"

# 必要に応じて、ここに他のコンテナやサービスを追加してください、 
# 以下の例で示しています;
# そのため、roboflow inference と複数のサービスを "compose" できます 
# サービスは、アプリケーションに応じて必要なものを

  another-container-service:
    image:  curlimages/curl:8.00.1
    entrypoint:
      - /bin/ash
      - -c
      - |
        while true; do 
        curl -s -X GET http://roboflow-inference-service:9001 
        sleep 5; 
        done
      
    depends_on:
      - roboflow-inference-service
  

ファイルを保存したら、次を入力してください docker-compose up をターミナルで実行してください。2 つの docker コンテナが起動します。roboflow inference server と、もう 1 つのコンテナが curl でアクセスする inference server に 5 秒ごとに。

この例を拡張して、アプリケーションに応じてスタックを構成するために、さらにコンテナを追加できます。

最終更新

役に立ちましたか?