diff --git a/orchestrator.yml b/orchestrator.yml index c73c5031..4474fbb1 100644 --- a/orchestrator.yml +++ b/orchestrator.yml @@ -43,12 +43,17 @@ services: # nvidia container toolkit etc must be installed. # Comment out "deploy" if on non-x86 platform (e.g. Pi4) deploy: - resources: - reservations: - devices: - - driver: nvidia - count: 1 - capabilities: [gpu] + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + # if torchserve is not being used, comment out the + # dependency. + depends_on: + torchserve: + condition: service_healthy volumes: - '${VOL_PREFIX}:/logs' command: diff --git a/torchserve-cuda.yml b/torchserve-cuda.yml index 476dcf18..7b308a2a 100644 --- a/torchserve-cuda.yml +++ b/torchserve-cuda.yml @@ -5,6 +5,8 @@ services: torchserve: restart: always image: iqtlabs/cuda-torchserve:v0.0.6 + healthcheck: + start_period: 120s networks: - gamutrf ports: @@ -12,7 +14,7 @@ services: - '8081:8081' volumes: - '${VOL_PREFIX}/model_store:/model_store' - - '/root/.cache:/root/.cache' + - '/root/.cache/pip:/root/.cache/pip' deploy: resources: reservations: diff --git a/torchserve.yml b/torchserve.yml index 62c23930..a771b910 100644 --- a/torchserve.yml +++ b/torchserve.yml @@ -5,6 +5,8 @@ services: torchserve: restart: always image: iqtlabs/torchserve:v0.0.6 + healthcheck: + start_period: 120s networks: - gamutrf ports: @@ -12,6 +14,6 @@ services: - '8081:8081' volumes: - '${VOL_PREFIX}/model_store:/model_store' - - '/root/.cache:/root/.cache' + - '/root/.cache/pip:/root/.cache/pip' command: - --models mini2_snr=mini2_snr.mar