-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
227 lines (211 loc) · 6.75 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
version: "3"
services:
tint:
restart: $RESTART_POLICY
image: rpozzi/tint
# build:
# context: tint
# dockerfile: Dockerfile
postgres:
restart: $RESTART_POLICY
image: postgres:14
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
volumes:
- ./postgres/data:/var/lib/postgresql/data
- "./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql"
mongo:
restart: $RESTART_POLICY
image: mongo:4.4.6 # mongo 5 requires cpu supports AVX
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: $MONGO_ROOT_PASSWORD
MONGO_INITDB_DATABASE: main
MONGO_INITDB_USERNAME: usr
MONGO_INITDB_PASSWORD: $MONGO_PASSWORD
volumes:
- ./mongo/data:/data/db
- ./mongo/initdb.d:/docker-entrypoint-initdb.d/
ports:
- "27017:27017"
documents:
restart: $RESTART_POLICY
build: documents
environment:
PORT: 3001
ENABLE_AUTH: false
MONGO: mongodb://usr:$MONGO_PASSWORD@mongo:27017/main
volumes:
- ./documents/src:/app/src
biencoder:
restart: $RESTART_POLICY
#image: rpozzi/blink_biencoder
build:
context: ./biencoder
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./biencoder/main.py:/home/app/main.py
environment:
PYTHONPATH: /home/app
BIENCODER_MODEL: $BIENCODER_MODEL
BIENCODER_CONFIG: $BIENCODER_CONFIG
deploy:
resources:
reservations:
devices:
- capabilities: [ gpu ]
# command: python main.py --host 0.0.0.0 --port 80 --biencoder_model $BIENCODER_MODEL --biencoder_config $BIENCODER_CONFIG
# command: sleep 3600
indexer:
restart: $RESTART_POLICY
# image: rpozzi/blink_indexer
build:
context: ./indexer
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./indexer/main.py:/home/app/main.py
environment:
INDEXER_INDEX: $INDEXER_INDEX
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
INDEXER_VECTOR_SIZE: $INDEXER_VECTOR_SIZE
INDEXER_LANGUAGE: $INDEXER_LANGUAGE
depends_on:
- postgres
# command: python main.py --host 0.0.0.0 --port 80 --index $INDEXER_INDEX --postgres postgres://postgres:$POSTGRES_PASSWORD@postgres:5432/postgres --vector-size $INDEXER_VECTOR_SIZE --language $INDEXER_LANGUAGE
nilcluster:
restart: $RESTART_POLICY
#image: rpozzi/blink_nilcluster
build:
context: ./nilcluster
dockerfile: Dockerfile
volumes:
- ./nilcluster/main.py:/home/app/main.py
- ./nilcluster/Packages:/home/app/Packages
# command: sleep 7200
# command: python main.py --host 0.0.0.0 --port 80
nilpredictor:
restart: $RESTART_POLICY
#image: rpozzi/blink_nilpredictor
build:
context: ./nilpredictor
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./nilpredictor/main.py:/home/app/main.py
environment:
NILPREDICTOR_ARGS: $NILPREDICTOR_ARGS
# command: python main.py --host 0.0.0.0 --port 80 $NILPREDICTOR_ARGS
triener:
restart: $RESTART_POLICY
build:
context: ./trie-ner
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./trie-ner/main.py:/home/app/main.py
- ./trie-ner/TrieNER.py:/home/app/TrieNER.py
environment:
TRIE_NAME: $TRIE_NAME
PATH_TO_SAVED_TRIES: $PATH_TO_SAVED_TRIES
mergener:
restart: $RESTART_POLICY
build:
context: ./merge-annotation-sets
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./merge-annotation-sets/main.py:/home/app/main.py
- ./merge-annotation-sets/build_type_relation_df.py:/home/app/build_type_relation_df.py
- ./merge-annotation-sets/merge_sets.py:/home/app/merge_sets.py
environment:
PATH_TO_TYPES: $MERGE_PATH_TO_TYPES
PATH_TO_TYPE_RELATION_CSV: $MERGE_PATH_TO_TYPE_RELATION_CSV
PATH_TO_ANNSET_PRIORITY: $MERGE_PATH_TO_ANNSET_PRIORITY
sectionator:
restart: $RESTART_POLICY
build:
context: ./sectionator
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./sectionator/main.py:/home/app/main.py
environment:
DISTRIBUZIONE_TERRITORIALE_UFFICI: $SECTIONATOR_DISTRIBUZIONE_TERRITORIALE_UFFICI
specialization:
restart: $RESTART_POLICY
build:
context: ./specialization
dockerfile: Dockerfile
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./specialization/main.py:/home/app/main.py
- ./specialization/fakeCandidates.py:/home/app/fakeCandidates.py
environment:
PIPELINE_ADDRESS: $PIPELINE_ADDRESS
# command: sleep 7200
pipeline:
restart: $RESTART_POLICY
build: pipelinehelper
environment:
PIPELINE_ARGS: $PIPELINE_ARGS
volumes:
- ./pipelinehelper/main.py:/home/app/main.py
spacyner:
restart: $RESTART_POLICY
build: ./spacyner
environment:
SPACY_MODEL: $SPACY_MODEL
SPACY_TAG: $SPACY_TAG
volumes:
- ${LOCAL_WORKSPACE_FOLDER}/models:/home/app/models
- ./spacyner/main.py:/home/app/main.py
deploy:
resources:
reservations:
devices:
- capabilities: [ gpu ]
# command: python __main__.py --host 0.0.0.0 --port 80 --model $SPACY_MODEL --tint http://tint:8012/tint
tintner:
restart: $RESTART_POLICY
build: ./tintner
volumes:
- ./tintner/main.py:/home/app/main.py
# command: python __main__.py --host 0.0.0.0 --port 80 --model $SPACY_MODEL --tint http://tint:8012/tint
caddy:
restart: $RESTART_POLICY
image: caddy:2
ports:
- "$CADDY_LISTEN_HTTP:80"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/site:/srv
- ./caddy/data:/data
- ./caddy/config:/config
ui:
restart: $RESTART_POLICY
build:
context: giustizia-ui
args:
ACCESS_USERNAME: $UI_ACCESS_USERNAME
ACCESS_PASSWORD: $UI_ACCESS_PASSWORD
API_BASE_URI: ${PIPELINE_ADDRESS}/api
API_USERNAME: ""
API_PASSWORD: ""
NEXTAUTH_SECRET: $UI_NEXTAUTH_SECRET
NEXTAUTH_URL: $UI_NEXTAUTH_URL
NEXT_PUBLIC_BASE_PATH: $UI_NEXT_PUBLIC_BASE_PATH
NEXT_PUBLIC_FULL_PATH: $UI_NEXT_PUBLIC_FULL_PATH
ports:
- $LISTEN_UI:3000
environment:
ACCESS_USERNAME: $UI_ACCESS_USERNAME
ACCESS_PASSWORD: $UI_ACCESS_PASSWORD
API_BASE_URI: ${PIPELINE_ADDRESS}/api
API_USERNAME: ""
API_PASSWORD: ""
NEXTAUTH_SECRET: $UI_NEXTAUTH_SECRET
NEXTAUTH_URL: $UI_NEXTAUTH_URL
NEXT_PUBLIC_BASE_PATH: $UI_NEXT_PUBLIC_BASE_PATH
NEXT_PUBLIC_FULL_PATH: $UI_NEXT_PUBLIC_FULL_PATH