-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
137 lines (129 loc) · 3.27 KB
/
docker-compose.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
services:
friendli-engine:
image: "${FRIENDLI_CONTAINER_REPO}:${FRIENDLI_CONTAINER_TAG}"
container_name: friendli-engine
environment:
FRIENDLI_CONTAINER_SECRET: "${FRIENDLI_CONTAINER_SECRET}"
NVIDIA_VISIBLE_DEVICES: "${FRIENDLI_CUDA_VISIBLE_DEVICES}"
NUM_DEVICES: "${FRIENDLI_NUM_DEVICES}"
HF_HUB_CACHE: /model
GRPC_MODE: "${GRPC_MODE}"
hostname: engine
ports:
- 9000:9000
- 9905:9905
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
volumes:
- ${HF_HUB_CACHE}:/model
- ${POLICY_DIR:-/dev/null}:/policy
command: >
--hf-model-name ${HF_MODEL_NAME}
--web-server-port 9000
--metrics-port 9905
--num-devices ${FRIENDLI_NUM_DEVICES}
--tokenizer-add-special-tokens true
--algo-policy-dir /policy
--grpc ${GRPC_MODE}
networks:
- promnet
friendli-exp-exposer:
image: friendliai/llm-serving-perf-evaluator:latest
container_name: friendli-exp-exposer
hostname: friendli-exp-exposer
ports:
- 8801:8801
volumes:
- ${HF_HUB_CACHE}:/model
- ${RESULT_DIR}:/home/exp/result
- ${CONFIG_DIR}:/home/exp/config
environment:
HF_MODEL_NAME: ${HF_MODEL_NAME}
HF_HUB_CACHE: /model
CLIENT_TYPE: ${CLIENT_TYPE}
command: >
--engine friendli
--model-name ${HF_MODEL_NAME}
--port 9000
--request-rate ${REQUEST_RATES}
--request-config-path ./config/request_config/friendli.yaml
--workload-config-path ./config/workload_config/dummy.yaml
--use-token
--verbose
--output-dir ./result
--host engine
--metrics-host friendli-exp-exposer
--duration ${DURATION}
--timeout ${TIMEOUT}
--metrics-port 8801
--client-type ${CLIENT_TYPE}
networks:
- promnet
init_prometheus:
image: prom/prometheus:v2.44.0
user: root
environment:
- UID=${UID}
entrypoint:
- /bin/sh
- -c
- |
chown -R ${UID}:${UID} /prometheus
volumes:
- ./prometheus/volume:/prometheus
prometheus:
image: prom/prometheus:v2.44.0
container_name: prometheus
hostname: prometheus
environment:
- UID=${UID}
user: ${UID}:${UID}
ports:
- 9090:9090
volumes:
- ./prometheus/config:/etc/prometheus
- ./prometheus/volume:/prometheus
command:
- --web.enable-lifecycle
- --web.enable-admin-api
- --config.file=/etc/prometheus/prometheus.yml
depends_on:
- init_prometheus
- friendli-exp-exposer
networks:
- promnet
init_grafana:
image: grafana/grafana:latest
user: root
environment:
- UID=${UID}
entrypoint:
- /bin/sh
- -c
- |
chown -R ${UID}:${UID} /var/lib/grafana
volumes:
- ./grafana/volume:/var/lib/grafana
grafana:
image: grafana/grafana:10.4.2
container_name: grafana
hostname: grafana
environment:
- UID=${UID}
user: ${UID}:${UID}
ports:
- 3000:3000
volumes:
- ./grafana/volume:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
- prometheus
networks:
- promnet
networks:
promnet:
driver: bridge