forked from 0xmoei/allora-testnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
167 lines (160 loc) · 6.58 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
```
version: '3'
services:
inference:
container_name: inference
build:
context: .
command: python -u /app/app.py
ports:
- "8000:8000"
networks:
eth-model-local:
aliases:
- inference
ipv4_address: 172.22.0.4
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/inference/ETH"]
interval: 10s
timeout: 10s
retries: 12
volumes:
- ./inference-data:/app/data
updater:
container_name: updater
build: .
environment:
- INFERENCE_API_ADDRESS=http://inference:8000
command: >
sh -c "
while true; do
python -u /app/update_app.py;
sleep 24h;
done
"
depends_on:
inference:
condition: service_healthy
networks:
eth-model-local:
aliases:
- updater
ipv4_address: 172.22.0.5
head:
container_name: head
image: alloranetwork/allora-inference-base-head:latest
environment:
- HOME=/data
entrypoint:
- "/bin/bash"
- "-c"
- |
if [ ! -f /data/keys/priv.bin ]; then
echo "Generating new private keys..."
mkdir -p /data/keys
cd /data/keys
allora-keys
fi
allora-node --role=head --peer-db=/data/peerdb --function-db=/data/function-db \
--runtime-path=/app/runtime --runtime-cli=bls-runtime --workspace=/data/workspace \
--private-key=/data/keys/priv.bin --log-level=debug --port=9010 --rest-api=:6000 \
--boot-nodes=/dns/head-0-p2p.testnet-1.testnet.allora.network/tcp/32130/p2p/12D3KooWLBhsSucVVcyVCaM9pvK8E7tWBM9L19s7XQHqqejyqgEC,/dns/head-1-p2p.testnet-1.testnet.allora.network/tcp/32131/p2p/12D3KooWEUNWg7YHeeCtH88ju63RBfY5hbdv9hpv84ffEZpbJszt,/dns/head-2-p2p.testnet-1.testnet.allora.network/tcp/32132/p2p/12D3KooWATfUSo95wtZseHbogpckuFeSvpL4yks6XtvrjVHcCCXk,/dns/head-5-p2p.testnet-1.testnet.allora.network/tcp/32135/p2p/12D3KooWAazxKoYszYt4XhCrGWoEUyAFMaU7DB9RZ8TsA7qwLfin,/dns/head-4-p2p.testnet-1.testnet.allora.network/tcp/32134/p2p/12D3KooWRF8HNU21AukE7KC6kZqxqvCiZ5nM9xcLW4YvsuGAYbcm,/dns/head-3-p2p.testnet-1.testnet.allora.network/tcp/32133/p2p/12D3KooWDrArwBSCNxwL3mgJ2NaUygdtPtiwVQtPJafyAH6FSiUf
ports:
- "6000:6000"
volumes:
- ./head-data:/data
working_dir: /data
networks:
eth-model-local:
aliases:
- head
ipv4_address: 172.22.0.100
worker-1:
container_name: worker-1
environment:
- INFERENCE_API_ADDRESS=http://inference:8000
- HOME=/data
build:
context: .
dockerfile: Dockerfile_b7s
entrypoint:
- "/bin/bash"
- "-c"
- |
if [ ! -f /data/keys/priv.bin ]; then
echo "Generating new private keys..."
mkdir -p /data/keys
cd /data/keys
allora-keys
fi
# Change boot-nodes below to the key advertised by your head
allora-node --role=worker --peer-db=/data/peerdb --function-db=/data/function-db \
--runtime-path=/app/runtime --runtime-cli=bls-runtime --workspace=/data/workspace \
--private-key=/data/keys/priv.bin --log-level=debug --port=9011 \
--boot-nodes=/dns/head-0-p2p.testnet-1.testnet.allora.network/tcp/32130/p2p/12D3KooWLBhsSucVVcyVCaM9pvK8E7tWBM9L19s7XQHqqejyqgEC,/dns/head-1-p2p.testnet-1.testnet.allora.network/tcp/32131/p2p/12D3KooWEUNWg7YHeeCtH88ju63RBfY5hbdv9hpv84ffEZpbJszt,/dns/head-2-p2p.testnet-1.testnet.allora.network/tcp/32132/p2p/12D3KooWATfUSo95wtZseHbogpckuFeSvpL4yks6XtvrjVHcCCXk,/dns/head-5-p2p.testnet-1.testnet.allora.network/tcp/32135/p2p/12D3KooWAazxKoYszYt4XhCrGWoEUyAFMaU7DB9RZ8TsA7qwLfin,/dns/head-4-p2p.testnet-1.testnet.allora.network/tcp/32134/p2p/12D3KooWRF8HNU21AukE7KC6kZqxqvCiZ5nM9xcLW4YvsuGAYbcm,/dns/head-3-p2p.testnet-1.testnet.allora.network/tcp/32133/p2p/12D3KooWDrArwBSCNxwL3mgJ2NaUygdtPtiwVQtPJafyAH6FSiUf,/ip4/172.22.0.100/tcp/9010/p2p/head-id \
--topic=allora-topic-1-worker --allora-chain-worker-mode=worker \
--allora-chain-restore-mnemonic='WALLET_SEED_PHRASE' \
--allora-node-rpc-address=https://allora-rpc.testnet-1.testnet.allora.network \
--allora-chain-key-name=worker-1 \
--allora-chain-topic-id=1
volumes:
- ./workers/worker-1:/data
working_dir: /data
depends_on:
- inference
- head
networks:
eth-model-local:
aliases:
- worker1
ipv4_address: 172.22.0.12
worker-2:
container_name: worker-2
environment:
- INFERENCE_API_ADDRESS=http://inference:8000
- HOME=/data
build:
context: .
dockerfile: Dockerfile_b7s
entrypoint:
- "/bin/bash"
- "-c"
- |
if [ ! -f /data/keys/priv.bin ]; then
echo "Generating new private keys..."
mkdir -p /data/keys
cd /data/keys
allora-keys
fi
# Change boot-nodes below to the key advertised by your head
allora-node --role=worker --peer-db=/data/peerdb --function-db=/data/function-db \
--runtime-path=/app/runtime --runtime-cli=bls-runtime --workspace=/data/workspace \
--private-key=/data/keys/priv.bin --log-level=debug --port=9013 \
--boot-nodes=/dns/head-0-p2p.testnet-1.testnet.allora.network/tcp/32130/p2p/12D3KooWLBhsSucVVcyVCaM9pvK8E7tWBM9L19s7XQHqqejyqgEC,/dns/head-1-p2p.testnet-1.testnet.allora.network/tcp/32131/p2p/12D3KooWEUNWg7YHeeCtH88ju63RBfY5hbdv9hpv84ffEZpbJszt,/dns/head-2-p2p.testnet-1.testnet.allora.network/tcp/32132/p2p/12D3KooWATfUSo95wtZseHbogpckuFeSvpL4yks6XtvrjVHcCCXk,/dns/head-5-p2p.testnet-1.testnet.allora.network/tcp/32135/p2p/12D3KooWAazxKoYszYt4XhCrGWoEUyAFMaU7DB9RZ8TsA7qwLfin,/dns/head-4-p2p.testnet-1.testnet.allora.network/tcp/32134/p2p/12D3KooWRF8HNU21AukE7KC6kZqxqvCiZ5nM9xcLW4YvsuGAYbcm,/dns/head-3-p2p.testnet-1.testnet.allora.network/tcp/32133/p2p/12D3KooWDrArwBSCNxwL3mgJ2NaUygdtPtiwVQtPJafyAH6FSiUf,/ip4/172.22.0.100/tcp/9010/p2p/head-id \
--topic=allora-topic-2-worker --allora-chain-worker-mode=worker \
--allora-chain-restore-mnemonic='WALLET_SEED_PHRASE' \
--allora-node-rpc-address=https://allora-rpc.testnet-1.testnet.allora.network \
--allora-chain-key-name=worker-2 \
--allora-chain-topic-id=2
volumes:
- ./workers/worker-2:/data
working_dir: /data
depends_on:
- inference
- head
networks:
eth-model-local:
aliases:
- worker1
ipv4_address: 172.22.0.13
networks:
eth-model-local:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24
volumes:
inference-data:
workers:
head-data:
```