forked from influxdata/sandbox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-gpu.yml
120 lines (117 loc) · 3.47 KB
/
docker-compose-gpu.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
version: '3.2'
services:
influxdb:
image: ch/influxdb:${INFLUXDB_TAG}
# Full tag list: https://hub.docker.com/r/library/influxdb/tags/
build:
context: ./images/influxdb/
dockerfile: ./Dockerfile
args:
INFLUXDB_TAG: ${INFLUXDB_TAG}
volumes:
# Mount for influxdb data directory
- ./influxdb/data:/var/lib/influxdb
# Mount for influxdb configuration
- ./influxdb/config/:/etc/influxdb
ports:
# The API for InfluxDB is served on port 8086
- '8086:8086'
- '8082:8082'
# UDP Port
- '8089:8089/udp'
kapacitor:
image: ch/kapacitor:${KAPACITOR_TAG}
# Full tag list: https://hub.docker.com/r/library/kapacitor/tags/
build:
context: ./images/kapacitor/
dockerfile: ./Dockerfile-gpu
args:
KAPACITOR_TAG: ${KAPACITOR_TAG}
deploy:
resources:
reservations:
devices:
- driver: nvidia
# count: all
device_ids: ['2','3']
capabilities: [gpu]
volumes:
# Mount for kapacitor data directory
- ./kapacitor/data/:/var/lib/kapacitor
# Mount for kapacitor configuration
- ./kapacitor/config/:/etc/kapacitor
# Mount for ai module logs
- ./kapacitor/logs/:/var/log/kapacitor-ai
# Mount for kapacitor predict UDF socket path
- ./kapacitor/sock/:/var/run/kapacitor
# Mount for ch-ai src path
- ../ch-ai/src/:/opt/cloudhub/ch-ai-src
# Mount for conda env path
- /data/jack/miniconda3/envs/cloudhub/:/opt/cloudhub
# Kapacitor requires network access to Influxdb
links:
- influxdb
ports:
# The API for Kapacitor is served on port 9092
# To avoid collision against Kafka port
#- "9092:9092"
- '9094:9092'
depends_on:
- influxdb
logstash:
image: ch/logstash:${ELK_TAG}
build:
context: ./logstash/
dockerfile: ./Dockerfile
args:
ELK_TAG: $ELK_TAG
volumes:
- type: bind
source: ./logstash/config/logstash.yml
target: /usr/share/logstash/config/logstash.yml
read_only: true
- type: bind
source: ./logstash/pipeline
target: /usr/share/logstash/pipeline
read_only: true
- type: bind
source: ./logstash/logs
target: /usr/share/logstash/logs
ports:
- "5044:5044"
- "5000:5000/tcp"
- "5000:5000/udp"
- "9600:9600"
environment:
LS_JAVA_OPTS: "-Xmx1g -Xms1g"
depends_on:
- influxdb
etcd:
# Full tag list: quay.io/coreos/etcd:v3.3.11
#image: gcr.io/etcd-development/etcd:${ETCD_TAG}
image: quay.io/coreos/etcd:${ETCD_TAG}
entrypoint: /usr/local/bin/etcd
environment:
- ETCDCTL_API=3
command:
- '--name=etcd1'
- '--data-dir=/var/lib/etcd'
- '--initial-advertise-peer-urls=http://etcd:2380'
- '--listen-peer-urls=http://0.0.0.0:2380'
- '--listen-client-urls=http://0.0.0.0:2379'
- '--advertise-client-urls=http://etcd:2379'
- '--initial-cluster-token=etcd-cluster-token'
- '--initial-cluster=etcd1=http://etcd:2380'
- '--initial-cluster-state=new'
- '--max-request-bytes=10485760' # 10 MBytes
- '--auto-tls'
- '--peer-auto-tls'
volumes:
# Mount for etcd data directory
- ./etcd/data:/var/lib/etcd
# Mount for sharing Host domains
- /etc/hosts:/etc/hosts
ports:
# The API for etcd is served on port
- '2379:2379'
- '2380:2380'