-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathdocker-compose-tensorzero.yml
More file actions
55 lines (52 loc) · 1.9 KB
/
docker-compose-tensorzero.yml
File metadata and controls
55 lines (52 loc) · 1.9 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
# This is a simplified example for learning purposes. Do not use this in production.
# For production-ready deployments, see: https://www.tensorzero.com/docs/gateway/deployment
services:
clickhouse:
image: clickhouse/clickhouse-server:24.12-alpine
environment:
- CLICKHOUSE_USER=chuser
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
- CLICKHOUSE_PASSWORD=chpassword
ports:
- "8123:8123"
healthcheck:
test: wget --spider --tries 1 http://chuser:chpassword@clickhouse:8123/ping
start_period: 30s
start_interval: 1s
timeout: 1s
# The TensorZero Python client *doesn't* require a separate gateway service.
#
# The gateway is only needed if you want to use the OpenAI Python client
# or interact with TensorZero via its HTTP API (for other programming languages).
#
# The TensorZero UI also requires the gateway service.
gateway:
image: tensorzero/gateway
volumes:
# Mount our tensorzero.toml file into the container
- ./tensorzero_config:/app/config:ro
command: --config-file /app/config/tensorzero.toml
environment:
- TENSORZERO_CLICKHOUSE_URL=http://chuser:chpassword@clickhouse:8123/tensorzero
- OPENAI_API_KEY=${OPENAI_API_KEY:?Environment variable OPENAI_API_KEY must be set.}
ports:
- "3000:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
clickhouse:
condition: service_healthy
ui:
image: tensorzero/ui
volumes:
# Mount our tensorzero.toml file into the container
- ./tensorzero_config:/app/config:ro
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:?Environment variable OPENAI_API_KEY must be set.}
- TENSORZERO_CLICKHOUSE_URL=http://chuser:chpassword@clickhouse:8123/tensorzero
- TENSORZERO_GATEWAY_URL=http://gateway:3000
ports:
- "4000:4000"
depends_on:
clickhouse:
condition: service_healthy