forked from hotosm/fAIr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
132 lines (121 loc) · 3.51 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
132 lines (121 loc) · 3.51 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
# fair-dev instance override, layered on top of docker-compose.yml.
services:
frontend-assets:
environment:
VITE_BASE_API_URL: ${VITE_BASE_API_URL}
VITE_AUTH_PROVIDER: ${VITE_AUTH_PROVIDER}
VITE_HANKO_URL: ${VITE_HANKO_URL}
VITE_FAIR_STAC_CATALOG_BASE_URL: ${VITE_FAIR_STAC_CATALOG_BASE_URL}
VITE_NODE_ENV: ${VITE_NODE_ENV}
VITE_FAIR_PROD_URL: ${VITE_FAIR_PROD_URL}
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
extra_hosts:
- "host.docker.internal:host-gateway"
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
volumes:
- caddy_data:/data
- caddy_config:/config
depends_on:
- api
postgres:
restart: unless-stopped
minio:
restart: unless-stopped
stac:
restart: unless-stopped
mlflow:
restart: unless-stopped
zenml:
restart: unless-stopped
api:
restart: unless-stopped
entrypoint:
[
"sh",
"-c",
'zenml init && zenml stack set fair-compose && python manage.py collectstatic --noinput && exec "$$@"',
"--",
]
command:
- gunicorn
- --bind=0.0.0.0:8000
- --workers=3
- --timeout=120
- config.wsgi:application
worker:
restart: unless-stopped
configs:
# ZenML artifact store on real AWS (same bucket + instance IAM role as backend storage).
zenml_stack:
content: |
stack_name: fair-compose
zenml_version: 0.94.2
components:
orchestrator:
name: docker_compose
flavor: local_docker
type: orchestrator
configuration:
synchronous: false
run_args:
network: fair-net
user: "0"
environment:
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: compute,utility
artifact_store:
name: s3_compose
flavor: s3
type: artifact_store
configuration:
path: s3://${BUCKET_NAME:-fair-dev}/${PARENT_BUCKET_FOLDER:-dev}/zenml
experiment_tracker:
name: mlflow_compose
flavor: mlflow
type: experiment_tracker
configuration:
tracking_uri: "http://mlflow:5000"
tracking_username: admin
tracking_password: admin
caddyfile:
content: |
{
email ${CADDY_ACME_EMAIL:-sysadmin@hotosm.org}
on_demand_tls {
ask http://127.0.0.1:5555/check
}
}
${PUBLIC_DOMAIN:-dev.ai.hotosm.org}, fair-dev.hotosm.org {
handle_path /stac/* {
reverse_proxy stac:8080
}
reverse_proxy api:8000
}
stac.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} {
reverse_proxy stac:8080
}
# Per-model knative predict endpoints. Kourier is HTTP-only (NodePort), so
# Caddy terminates TLS per host on demand and proxies to the node ingress.
:5555 {
respond /check 200
}
*.predict.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} {
tls {
on_demand
}
reverse_proxy ${KNATIVE_KOURIER_ADDR:-host.docker.internal:31751}
}
# mlflow.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} { reverse_proxy mlflow:5000 }
# zenml.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} { reverse_proxy zenml:8080 }
# minio.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} { reverse_proxy minio:9000 }
# console.${PUBLIC_DOMAIN:-dev.ai.hotosm.org} { reverse_proxy minio:9001 }
volumes:
caddy_data:
caddy_config: