allora/docker-compose.yml
2024-03-06 19:07:54 +02:00

108 lines
2.8 KiB
YAML

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
updater:
container_name: updater-basic-eth-pred
build: .
environment:
- INFERENCE_API_ADDRESS=http://inference:8000
command: python -u /app/update_app.py
depends_on:
- inference
networks:
eth-model-local:
aliases:
- updater
ipv4_address: 172.22.0.5
worker:
container_name: worker-basic-eth-pred
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=/ip4/172.22.0.100/tcp/9010/p2p/12D3KooWSBJucc8S3YdLH8n5UqTQpSbNjwEjcnYCW8zWuPhDAFHY \
--topic=1
volumes:
- ./worker-data:/data
working_dir: /data
depends_on:
- inference
- head
networks:
eth-model-local:
aliases:
- worker
ipv4_address: 172.22.0.10
head:
# 12D3KooWSBJucc8S3YdLH8n5UqTQpSbNjwEjcnYCW8zWuPhDAFHY
container_name: head-basic-eth-pred
image: 696230526504.dkr.ecr.us-east-1.amazonaws.com/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
ports:
- "6000:6000"
volumes:
- ./head-data:/data
working_dir: /data
networks:
eth-model-local:
aliases:
- head
ipv4_address: 172.22.0.100
networks:
eth-model-local:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24
volumes:
worker-data:
head-data: