generated from mobiusml/aana_app_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
68 lines (65 loc) · 1.93 KB
/
docker-compose.yaml
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
version: '3.8'
services:
postgres:
restart: always
container_name: aana_summarize_video_db
image: postgres
command: postgres -c 'max_connections=1000'
healthcheck:
test: /usr/bin/pg_isready
timeout: 45s
interval: 10s
retries: 10
ports:
- '15430:15430'
expose:
- 15430
environment:
PGPASSWORD: '${POSTGRES_PASSWORD:-Yf?5nX39}'
PGUSER: '${POSTGRES_USER:-aana_db_user}'
PGDATABASE: '${POSTGRES_DB:-aana_db}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-Yf?5nX39}'
POSTGRES_USER: '${POSTGRES_USER:-aana_db_user}'
POSTGRES_DB: '${POSTGRES_DB:-aana_db}'
PGPORT: '15430'
PGDATA: '/pgdata'
volumes:
- pg_data:/pgdata
aana_summarize_video_app:
restart: always
container_name: aana_summarize_video_app
depends_on:
postgres:
condition: service_healthy
ports:
- 8000:8000 # request server
expose:
- '8000'
build:
context: .
dockerfile: Dockerfile
args:
INSTALL_FLASH_ATTENTION: '${INSTALL_FLASH_ATTENTION:-false}'
deploy:
resources:
reservations:
devices:
- capabilities: ["gpu"]
environment:
CUDA_VISIBLE_DEVICES:
HF_HUB_ENABLE_HF_TRANSFER: '${HF_HUB_ENABLE_HF_TRANSFER:-1}'
HF_TOKEN: '${HF_TOKEN}'
HF_DATASETS_CACHE: /root/.cache/huggingface
NUM_WORKERS: '${NUM_WORKERS:-2}'
TMP_DATA_DIR: /tmp/aana_data
DB_CONFIG: '{"datastore_type":"postgresql","datastore_config":{"host":"postgres","port":"15430","user":"${POSTGRES_USER:-aana_db_user}","password":"${POSTGRES_PASSWORD:-Yf?5nX39}","database":"${POSTGRES_DB:-aana_db}"}}'
volumes:
- app_data:/tmp/aana_data
- hf_datasets_cache:/root/.cache/huggingface
volumes:
pg_data:
name: aana_summarize_video_postgres_data
app_data:
name: aana_summarize_video_app_data
hf_datasets_cache:
name: hf_datasets_cache