-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (91 loc) · 3.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (91 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# =============================================================================
# swift — On-Device CoreML Bioacoustic Classifier
# =============================================================================
# Apple platforms ship CoreML; Linux containers do not. The PROMPT calls for
# two operating modes:
#
# * RUNTIME_HOST_MODE=host (default on macOS)
# The Swift runtime runs natively on the host via
# `make run-host-runtime`. Container layout below brings up `ollama`
# + `arcp-client` only. The runtime container is profile-gated off.
#
# * RUNTIME_HOST_MODE=container (default on Linux / CI)
# The runtime container is brought up too, and routes classification
# through the ONNX fallback / deterministic stub since CoreML is not
# available inside the Linux container.
#
# The default profile of `arcp-runtime` is `containerized`. On macOS you can
# omit it via `--profile=""` or just run `make up` and follow the printed
# `make run-host-runtime` hint in a second terminal.
include:
- path: ../shared/docker-compose.ollama.yml
services:
arcp-runtime:
profiles: ["containerized"] # Off by default on macOS host-runtime mode
build:
context: .
args:
ARCP_SDK_VERSION: ${ARCP_SDK_VERSION:-latest}
image: arcp-sdk-examples/swift-runtime:dev
container_name: arcp-swift-runtime
depends_on:
ollama:
condition: service_healthy
environment:
ROLE: runtime
OLLAMA_URL: ${OLLAMA_URL:-http://ollama:11434}
OLLAMA_MODEL: ${OLLAMA_MODEL:-qwen2.5:1.5b-instruct}
ARCP_RUNTIME_HOST: ${ARCP_RUNTIME_HOST:-0.0.0.0}
ARCP_RUNTIME_PORT: ${ARCP_RUNTIME_PORT:-8080}
ARCP_RUNTIME_PATH: ${ARCP_RUNTIME_PATH:-/arcp}
ARCP_AUTH_TOKEN: ${ARCP_AUTH_TOKEN:-dev-token-change-me}
ARCP_AGENT_NAME: ${ARCP_AGENT_NAME:-bioacoustic.annotate}
RECORDINGS_DIR: ${RECORDINGS_DIR:-/data/recordings}
MODELS_DIR: ${MODELS_DIR:-/data/models}
ANNOTATIONS_DIR: ${ANNOTATIONS_DIR:-/data/annotations}
DEFAULT_MODEL: ${DEFAULT_MODEL:-BirdNET-v2.4}
COREML_BACKEND: ${COREML_BACKEND:-onnx} # coreml | onnx
SPECTROGRAM_FFT_N: ${SPECTROGRAM_FFT_N:-1024}
SPECTROGRAM_HOP: ${SPECTROGRAM_HOP:-256}
CONFIDENCE_FLOOR: ${CONFIDENCE_FLOOR:-0.85}
ENTROPY_TRIGGER: ${ENTROPY_TRIGGER:-1.2}
PER_RECORDING_BUDGET_USD: ${PER_RECORDING_BUDGET_USD:-0.20}
LOG_LEVEL: ${LOG_LEVEL:-info}
volumes:
- ./Samples/whales:/data/recordings:ro
- ./Samples/models:/data/models:ro
- ./out:/data/annotations
ports:
- "${ARCP_RUNTIME_PORT:-8080}:${ARCP_RUNTIME_PORT:-8080}"
arcp-client:
build:
context: .
args:
ARCP_SDK_VERSION: ${ARCP_SDK_VERSION:-latest}
image: arcp-sdk-examples/swift-client:dev
container_name: arcp-swift-client
depends_on:
ollama:
condition: service_healthy
environment:
ROLE: client
ARCP_RUNTIME_URL: ws://arcp-runtime:${ARCP_RUNTIME_PORT:-8080}${ARCP_RUNTIME_PATH:-/arcp}
ARCP_AUTH_TOKEN: ${ARCP_AUTH_TOKEN:-dev-token-change-me}
ARCP_CLIENT_NAME: ${ARCP_CLIENT_NAME:-bioacoustic-client}
ARCP_AGENT_NAME: ${ARCP_AGENT_NAME:-bioacoustic.annotate}
RECORDINGS_DIR: ${RECORDINGS_DIR:-/data/recordings}
MODELS_DIR: ${MODELS_DIR:-/data/models}
ANNOTATIONS_DIR: ${ANNOTATIONS_DIR:-/data/annotations}
DEFAULT_MODEL: ${DEFAULT_MODEL:-BirdNET-v2.4}
LOG_LEVEL: ${LOG_LEVEL:-info}
entrypoint: ["/usr/bin/tini", "--"]
command:
["/usr/local/bin/bioacoustic", "annotate",
"--in", "/data/recordings",
"--model", "${DEFAULT_MODEL:-BirdNET-v2.4}",
"--out", "/data/annotations",
"--models-dir", "/data/models"]
volumes:
- ./Samples/whales:/data/recordings:ro
- ./Samples/models:/data/models:ro
- ./out:/data/annotations