generated from mobiusml/aana_app_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.dstack.yaml
50 lines (39 loc) · 1.44 KB
/
app.dstack.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
type: service
name: aana-chat-with-video
image: nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
env:
- NUM_WORKERS=5
- TASK_QUEUE__EXECUTION_TIMEOUT=10000
- TASK_QUEUE__NUM_WORKERS=5
- TMP_DATA_DIR=/demo_data/aana
- IMAGE_DIR=/demo_data/aana/images
- VIDEO_DIR=/demo_data/aana/videos
- AUDIO_DIR=/demo_data/aana/audios
- MODEL_DIR=/demo_data/aana/models
- DB_CONFIG__DATASTORE_TYPE=sqlite
- DB_CONFIG__DATASTORE_CONFIG__PATH=/demo_data/aana.db
commands:
- apt-get update
- apt-get install -y libgl1 libglib2.0-0 ffmpeg python3 python3-dev git nvtop htop sqlite3 cron
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH=$PATH:/root/.local/bin
- sh install.sh
- mkdir -p /demo_data
- mkdir -p /demo_data/hf_cache
- (crontab -l 2>/dev/null; echo "0 3 * * * find $TMP_DATA_DIR/videos/* -type f -atime +3 -exec rm -f {} \;") | sort -u | crontab -
- (crontab -l 2>/dev/null; echo "0 3 * * * find $TMP_DATA_DIR/audios/* -type f -atime +3 -exec rm -f {} \;") | sort -u | crontab -
- (crontab -l 2>/dev/null; echo "0 3 * * * find $TMP_DATA_DIR/images/* -type f -atime +3 -exec rm -f {} \;") | sort -u | crontab -
- HF_HUB_CACHE="/demo_data/hf_cache" CUDA_VISIBLE_DEVICES="0" poetry run aana deploy aana_chat_with_video.app:aana_app
port: 8000
replicas: 1
auth: False
spot_policy: on-demand
max_price: 0.5
volumes:
- name: demo-data
path: /demo_data
resources:
gpu: 48GB..
cpu: 8..
memory: 50GB..
disk: 50GB..