Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
152 lines (151 loc) · 4.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
152 lines (151 loc) · 4.16 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
services:
secret_db:
image: postgres:14.5
restart: unless-stopped
container_name: secret_db
environment:
- POSTGRES_USER=secret
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=secretdb
- PGDATA=/data/postgres
ports:
- '5431:5432'
volumes:
- /opt/inferx/config/secret.sql:/docker-entrypoint-initdb.d/db.sql
- /opt/inferx/data/postgres_secret:/data/postgres
db:
image: postgres:14.5
restart: unless-stopped
container_name: db
environment:
- POSTGRES_USER=audit_user
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=auditdb
- PGDATA=/data/postgres
ports:
- '5432:5432'
volumes:
- /opt/inferx/config/create_table.sql:/docker-entrypoint-initdb.d/db.sql
- /opt/inferx/data/postgres:/data/postgres
etcd:
image: quay.io/coreos/etcd:v3.5.13
restart: unless-stopped
container_name: etcd
volumes:
- /opt/inferx/data/etcd:/opt/inferx/data/etcd
command:
- etcd
- --name=etcd-00
- --data-dir=/opt/inferx/data/etcd
- --advertise-client-urls=http://etcd-00:2379
- --listen-client-urls=http://0.0.0.0:2379
- --initial-advertise-peer-urls=http://etcd-00:2380
- --listen-peer-urls=http://0.0.0.0:2380
- --initial-cluster=etcd-00=http://etcd-00:2380
ports:
- '2379:2379'
- '2380:2380'
inferx:
image: inferx/inferx_one:v0.1.0
restart: on-failure
container_name: inferx_one
privileged: true
user: root
cpus: 10
network_mode: "host"
pid: "host"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:4000" ]
interval: 10s
timeout: 10s
retries: 3
depends_on:
db:
condition: service_started
etcd:
condition: service_started
keycloak:
condition: service_started
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /run/udev:/run/udev
- /dev/hugepages:/dev/hugepages
- /opt/inferx/:/opt/inferx/
- /etc/letsencrypt/:/etc/letsencrypt/
- /var/run/docker/runtime-runc/moby/:/var/run/docker/runtime-runc/moby/
- /var/lib/docker/:/var/lib/docker/
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # alternatively, use `count: all` for all GPUs
capabilities: [ gpu ]
command:
- ./onenode
- /opt/inferx/config/node1.json
dashboard:
image: inferx/inferx_dashboard:v0.1.0
restart: on-failure
container_name: inferx_dashboard
network_mode: "host"
environment:
- KEYCLOAK_URL=http://${LOCAL_IP}:81/authn
- KEYCLOAK_REALM_NAME=inferx
- KEYCLOAK_CLIENT_ID=infer_client
- KEYCLOAK_CLIENT_SECRET=M2Dse5531tdtyipZdGizLEeoOVgziQRX
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:1250/listnode" ]
interval: 10s
timeout: 10s
retries: 3
depends_on:
- db
- etcd
volumes:
- /etc/letsencrypt/:/etc/letsencrypt/
keycloak-postgres:
image: postgres:14.5
restart: unless-stopped
container_name: keycloak_db
environment:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=keycloak
- PGDATA=/data/postgres
networks:
- keycloak-network
volumes:
- /opt/inferx/data/postgres_keycloak:/data/postgres
keycloak:
image: quay.io/keycloak/keycloak:latest
restart: on-failure
container_name: keycloak
# network_mode: "host"
networks:
- keycloak-network
ports:
- '1260:8080'
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://keycloak-postgres:5432/keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=123456
- KC_PROXY=edge
- KC_HTTP_ENABLED=true
- KC_HOSTNAME_STRICT_HTTPS=false
- KC_HOSTNAME_STRICT=false
- KC_PROXY_ADDRESS_FORWARDING=true
- KC_PROXY_HEADERS=xforwarded
- KC_HTTP_RELATIVE_PATH=/authn
depends_on:
keycloak-postgres:
condition: service_started
command:
- start-dev
- --verbose
networks:
keycloak-network:
driver: bridge