-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
131 lines (130 loc) · 3.45 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
version: "2.3"
services:
# Main API container
api:
# depends_on:
# - api_umap
# - api_tsne
build:
context: ./api
dockerfile: ./api.slim.Dockerfile # Switch to api.Dockerfile for full API
volumes:
# Code
- ./api:/home/backend
# Shared folder
- ./api/_shared:/_shared
environment:
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- FLASK_ENV=development
- FLASK_APP=app.py
ports:
- 5050:5000
# docker-compose 1.28+ supports GPU reservation: https://docs.docker.com/compose/gpu-support/#enabling-gpu-access-to-service-containers
# deploy:
# resources:
# reservations:
# devices:
# - capabilities:
# - gpu
# Jupyter notebook container using same image of API for testing purposes
# api_notebook:
# image: cddd-explorer-api:latest
# # Enable this to launch the jupyter API instead of the API itself
# command: ["jupyter", "notebook", "--notebook-dir=/_shared", "--port=8880", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
# volumes:
# # Shared folder
# - ./api/_shared:/_shared
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all
# ports:
# - 8880:8880
# deploy:
# resources:
# reservations:
# devices:
# - capabilities:
# - gpu
# api_umap:
# image: cddd-explorer-api-umap:latest
# build: api_umap
# volumes:
# # Code
# - ./api_umap:/home/backend
# # Shared folder
# - ./api_umap/_shared:/_shared
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all
# - FLASK_ENV=development
# - FLASK_APP=app.py
# ports:
# - 5001:5000
# # deploy:
# # resources:
# # reservations:
# # devices:
# # - capabilities:
# # - gpu
# t-SNE API is not used right now.
# api_tsne:
# image: cddd-explorer-api-tsne:latest
# build: api_tsne
# volumes:
# # Code
# - ./api_tsne:/home/backend
# # Shared folder
# - ./api_tsne/_shared:/_shared
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all
# # - FLASK_ENV=development
# # - FLASK_APP=app.py
# ports:
# - "5002:5000"
# deploy:
# resources:
# reservations:
# devices:
# - capabilities:
# - gpu
client:
build: client
volumes:
- ./client:/frontend
environment:
- NODE_ENV=development
ports:
- 3000:3000
depends_on:
- api
# client_prod:
# image: cddd-explorer-client-prod:latest
# build:
# context: ./client
# dockerfile: ./deploy/prod.Dockerfile
# environment:
# - NODE_ENV=production
# - API_HOST=http://api:5000
# - DATASETS_URL=https://drive.google.com/drive/folders/1m6O9ftkL66X1vnRfXO0ohjO4Ye4GjHYU?usp=sharing
# ports:
# - 3080:80
# depends_on:
# - api
# notebook:
# build: notebook
# ports:
# - 8888:8888
# volumes:
# - ./notebook/_shared:/home/jovyan/work
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all
# deploy:
# resources:
# reservations:
# devices:
# - capabilities:
# - gpu