allora/docker-compose.yml

123 lines
3.0 KiB
YAML
Raw Normal View History

2024-03-06 18:53:48 +03:00
version: '3'
services:
inference:
container_name: inference-basic-eth-pred
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: 5s
retries: 12
volumes:
- ./inference-data:/app/data
2024-03-06 20:07:54 +03:00
updater:
container_name: updater-basic-eth-pred
build: .
environment:
- INFERENCE_API_ADDRESS=http://inference:8000
command: >
sh -c "
while true; do
python -u /app/update_app.py;
sleep 24h;
done
"
2024-03-06 20:07:54 +03:00
depends_on:
inference:
condition: service_healthy
2024-03-06 20:07:54 +03:00
networks:
eth-model-local:
aliases:
- updater
ipv4_address: 172.22.0.5
2024-06-28 07:19:18 +03:00
head:
container_name: head-basic-eth-pred
image: alloranetwork/allora-inference-base-head:latest
2024-03-06 18:53:48 +03:00
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
2024-06-28 07:19:18 +03:00
allora-node --role=head --peer-db=/data/peerdb --function-db=/data/function-db \
2024-03-06 18:53:48 +03:00
--runtime-path=/app/runtime --runtime-cli=bls-runtime --workspace=/data/workspace \
2024-07-20 13:00:10 +03:00
--private-key=/data/keys/priv.bin --log-level=debug --port=9010 --rest-api=:6000
2024-06-28 07:19:18 +03:00
ports:
- "6000:6000"
2024-03-06 18:53:48 +03:00
volumes:
2024-06-28 07:19:18 +03:00
- ./head-data:/data
2024-03-06 18:53:48 +03:00
working_dir: /data
networks:
eth-model-local:
aliases:
2024-06-28 07:19:18 +03:00
- head
ipv4_address: 172.22.0.100
2024-03-06 18:53:48 +03:00
2024-06-28 07:19:18 +03:00
worker:
container_name: worker-basic-eth-pred
2024-03-06 18:53:48 +03:00
environment:
2024-06-28 07:19:18 +03:00
- INFERENCE_API_ADDRESS=http://inference:8000
2024-03-06 18:53:48 +03:00
- HOME=/data
2024-06-28 07:19:18 +03:00
build:
context: .
dockerfile: Dockerfile_b7s
2024-03-06 18:53:48 +03:00
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
2024-06-28 07:19:18 +03:00
# Change boot-nodes below to the key advertised by your head
allora-node --role=worker --peer-db=/data/peerdb --function-db=/data/function-db \
2024-03-06 18:53:48 +03:00
--runtime-path=/app/runtime --runtime-cli=bls-runtime --workspace=/data/workspace \
2024-06-28 07:19:18 +03:00
--private-key=/data/keys/priv.bin --log-level=debug --port=9011 \
2024-07-20 13:00:10 +03:00
--boot-nodes=/ip4/172.22.0.100/tcp/9010/p2p/{HEAD-ID} \
--topic=allora-topic-1-worker
2024-03-06 18:53:48 +03:00
volumes:
2024-06-28 07:19:18 +03:00
- ./worker-data:/data
2024-03-06 18:53:48 +03:00
working_dir: /data
2024-06-28 07:19:18 +03:00
depends_on:
- inference
- head
2024-03-06 18:53:48 +03:00
networks:
eth-model-local:
aliases:
2024-06-28 07:19:18 +03:00
- worker
ipv4_address: 172.22.0.10
2024-03-06 18:53:48 +03:00
networks:
eth-model-local:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24
volumes:
inference-data:
2024-03-06 18:53:48 +03:00
worker-data:
head-data: