Edge deployment platform for ONA Platform services, optimized for ARM64 devices like Raspberry Pi CM4.
This repository contains edge-optimized versions of ONA Platform services, designed to run on resource-constrained devices with ARM64 architecture. The primary focus is on deploying the forecasting API service for local inference.
- Target Devices: Raspberry Pi CM4, Orange Pi 5, Rock 5B, and similar ARM64 SBCs
- OS Support: Raspberry Pi OS, Ubuntu ARM64, Debian ARM64
- Container Runtime: Docker with ARM64 support
- Services: forecastingApi (primary), with extensibility for other services
- ARM64 Optimized: All containers built for ARM64 architecture
- Resource Efficient: Optimized for low-power, low-memory devices
- Edge Native: Designed for local inference without cloud dependencies
- Model Management: Automated model updates and caching
- Monitoring: Built-in health checks and performance monitoring
- ARM64 device (Raspberry Pi CM4 recommended)
- Docker installed
- 4GB+ RAM (8GB recommended)
- 16GB+ storage
- Internet connection for model updates
# Clone the repository
git clone <repository-url> platform-edge
cd platform-edge
# Setup sync with main platform repository
./scripts/setup-sync.sh
# Build and start services
docker-compose up -d
# Check status
docker-compose ps- Copy
config/environment.example.shtoconfig/environment.sh - Update configuration variables
- Restart services:
docker-compose restart
Edge-optimized forecasting service for solar energy prediction.
Features:
- Pre-trained model inference
- Redis caching
- Automated model updates
- RESTful API endpoints
Endpoints:
GET /health- Health checkPOST /forecast- Generate forecastGET /status- Service status
# Start development environment
docker-compose -f docker-compose.dev.yml up
# Run tests
make test
# Build for production
make build# Sync service code from main platform repository
./scripts/sync-services.sh
# Check sync status
./scripts/sync-services.sh status
# Validate current state
./scripts/sync-services.sh validate- Add service to
SERVICES_TO_SYNCinscripts/sync-services.sh - Define sync files in
SYNC_FILESarray - Define preserve files in
PRESERVE_FILESarray - Create edge-specific Dockerfile and configuration
- Update
docker-compose.yml
# Deploy to edge device
./scripts/deploy.sh
# Update models
./scripts/update-models.sh
# Monitor services
./scripts/monitor.sh- Models are automatically downloaded from cloud storage
- Weekly model updates are scheduled
- Local model caching reduces download times
- Model validation ensures integrity
- Service health endpoints
- Resource usage monitoring
- Model freshness tracking
- Error rate monitoring
# View service logs
docker-compose logs -f forecasting-api
# View all logs
docker-compose logs -f- Forecast Generation: 2-5 seconds
- Memory Usage: 1-2GB
- CPU Usage: <20% peak
- Storage: <1GB for models
- Power: 3-5W active, 1W idle
- Out of Memory: Increase swap or use 8GB CM4
- Model Download Fails: Check network connectivity
- Slow Performance: Ensure ARM64 optimized containers
- Docker Issues: Update Docker to latest version
- Check logs:
docker-compose logs - Verify configuration:
./scripts/check-config.sh - Test connectivity:
./scripts/test-connectivity.sh
- Fork the repository
- Create feature branch
- Make changes
- Test on ARM64 device
- Submit pull request
[Add your license here]
- Initial release
- forecastingApi edge deployment
- ARM64 optimization
- Docker Compose setup
- Model management system