Skip to main content

Pi Deploy Profiles

Apiary provides 10 Docker Compose profiles that constrain container resources to match specific Raspberry Pi hardware. These are used for benchmarking, testing, and simulating Pi deployments on more powerful machines.

Available Profiles

ProfileFilePi Model
Pi 3deploy/docker-compose.pi3.ymlRaspberry Pi 3 (1 GB RAM, 1.4 GHz)
Pi 4 1GBdeploy/docker-compose.pi4-1gb.ymlRaspberry Pi 4 (1 GB RAM, 1.5 GHz)
Pi 4 2GBdeploy/docker-compose.pi4-2gb.ymlRaspberry Pi 4 (2 GB RAM, 1.5 GHz)
Pi 4 4GBdeploy/docker-compose.pi4-4gb.ymlRaspberry Pi 4 (4 GB RAM, 1.5 GHz)
Pi 4 8GBdeploy/docker-compose.pi4-8gb.ymlRaspberry Pi 4 (8 GB RAM, 1.5 GHz)
Pi 5 1GBdeploy/docker-compose.pi5-1gb.ymlRaspberry Pi 5 (1 GB RAM, 2.4 GHz)
Pi 5 2GBdeploy/docker-compose.pi5-2gb.ymlRaspberry Pi 5 (2 GB RAM, 2.4 GHz)
Pi 5 4GBdeploy/docker-compose.pi5-4gb.ymlRaspberry Pi 5 (4 GB RAM, 2.4 GHz)
Pi 5 8GBdeploy/docker-compose.pi5-8gb.ymlRaspberry Pi 5 (8 GB RAM, 2.4 GHz)
Pi 5 16GBdeploy/docker-compose.pi5-16gb.ymlRaspberry Pi 5 (16 GB RAM, 2.4 GHz)

Resource Constraints

Each profile sets CPU and memory limits per container to simulate the target Pi model:

ProfileCPU LimitMemory/NodeMemory/MinIONode Reservation
Pi 32.0512 MB512 MB256 MB
Pi 4 1GB2.0512 MB512 MB256 MB
Pi 4 2GB2.01 GB768 MB512 MB
Pi 4 4GB2.02 GB1.5 GB1 GB
Pi 4 8GB2.04 GB3 GB2 GB
Pi 5 1GB2.5512 MB512 MB256 MB
Pi 5 2GB2.51 GB768 MB512 MB
Pi 5 4GB2.52 GB1.5 GB1 GB
Pi 5 8GB2.54 GB3 GB2 GB
Pi 5 16GB2.58 GB6 GB4 GB

CPU limit rationale:

  • Pi 3/4: cpus: '2.0' simulates the 1.4--1.5 GHz quad-core at ~50% of a modern x86 core
  • Pi 5: cpus: '2.5' simulates the 2.4 GHz quad-core at ~62% of a modern x86 core

Architecture

All profiles follow the same 3-service pattern:

ServicePurpose
minioS3-compatible object storage with health check
minio-setupOne-shot container that creates the apiary bucket
apiary-nodeScalable Apiary compute node

Usage

Start a Profile

# Single node with Pi 4 4GB constraints
docker compose -f deploy/docker-compose.pi4-4gb.yml up -d

# Three nodes
docker compose -f deploy/docker-compose.pi4-4gb.yml up -d --scale apiary-node=3

Stop

docker compose -f deploy/docker-compose.pi4-4gb.yml down

Override Environment Variables

All profiles support these environment variables:

VariableDefaultDescription
MINIO_ROOT_USERminioadminMinIO admin username
MINIO_ROOT_PASSWORDminioadminMinIO admin password
APIARY_STORAGE_URLs3://apiary/dataStorage URL for Apiary nodes
APIARY_NAME{profile}-benchmarkInstance name (varies per profile)
APIARY_IMAGEapiary:latestDocker image to use
RUST_LOGinfoLog verbosity
# Custom image and log level
APIARY_IMAGE=apiary:dev RUST_LOG=debug docker compose -f deploy/docker-compose.pi4-4gb.yml up -d

Choosing a Profile

ScenarioRecommended Profile
Quick smoke testsPi 3 or Pi 4 1GB (most constrained)
Realistic Pi deployment testingPi 4 4GB or Pi 5 4GB
Performance benchmarkingPi 5 8GB or Pi 5 16GB
Stress testing / finding limitsPi 3 (most constrained)
Cloud-like testingUse the main docker-compose.yml without resource constraints

Use with Benchmarks

The benchmark framework integrates with these profiles via the --profile flag:

python benchmarks/bench_runner.py --suite ssb --engine apiary-docker --image apiary:latest --profile pi4-4gb

See Benchmarks for the full benchmark framework documentation.