-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (91 loc) · 2.55 KB
/
docker-compose.yml
File metadata and controls
96 lines (91 loc) · 2.55 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
95
96
# Defines and orchestrates the Whisper and Elasticsearch service containers for the Therascript application.
#
# Usage:
# GPU (Linux with NVIDIA): docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d --build
# CPU (Mac or no GPU): docker compose up -d --build
services:
# Whisper Transcription Service (CPU mode - default)
whisper:
build:
context: .
dockerfile: packages/whisper/Dockerfile
image: therascript/whisper:cpu
container_name: therascript_whisper_service
ports:
- '127.0.0.1:8000:8000'
volumes:
- whisper_models:/root/.cache/whisper
- hf_cache:/root/.cache/huggingface
- torch_cache:/root/.cache/torch
environment:
- HF_TOKEN=${HF_TOKEN:-}
restart: unless-stopped
healthcheck:
test: [ 'CMD', 'curl', '--fail', 'http://localhost:8000/health' ]
interval: 15s
timeout: 5s
retries: 3
start_period: 60s
# Elasticsearch Service
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1
container_name: therascript_elasticsearch_service
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
- TAKE_FILE_OWNERSHIP=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- '127.0.0.1:9200:9200'
volumes:
- es_data:/usr/share/elasticsearch/data
healthcheck:
test: [ 'CMD-SHELL', "curl -fsSL http://localhost:9200/_cat/health?h=status | grep -q 'green\\|yellow'" ]
interval: 10s
timeout: 10s
retries: 10
start_period: 120s
# Kibana Service (Optional, for development and exploring ES data)
kibana:
image: docker.elastic.co/kibana/kibana:8.14.1
container_name: therascript_kibana_service
environment:
- ELASTICSEARCH_HOSTS=http://therascript_elasticsearch_service:9200
ports:
- '127.0.0.1:5601:5601'
depends_on:
elasticsearch:
condition: service_healthy
restart: unless-stopped
# Redis Service for Job Queues
redis:
image: redis:7.2-alpine
container_name: therascript_redis_service
ports:
- '127.0.0.1:6379:6379'
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: [ 'CMD', 'redis-cli', 'ping' ]
interval: 10s
timeout: 5s
retries: 5
volumes:
es_data:
driver: local
whisper_models:
driver: local
hf_cache:
driver: local
torch_cache:
driver: local
redis_data:
driver: local