MicroDC Worker Client¶
A flexible, extensible worker client for the MicroDC.ai distributed inference platform.
Features¶
- Pluggable Inference Engines - Support for Ollama, vLLM, HuggingFace Transformers
- Document Processing - Extract text and markdown from PDF, DOCX, PPTX, XLSX, images, and more using Docling
- OCR Processing - Advanced OCR with Surya supporting 90+ languages, layout detection, table recognition, and reading order
- Model-Based Routing - Jobs route to engines based on
model_id(supports multiple OCR/document engines) - Automatic Model Discovery - Detects and reports available models from all engines
- Resource Management - Efficient GPU/CPU utilization and monitoring
- GPU Support - NVIDIA CUDA and Apple Metal Performance Shaders (MPS)
- Claim-Based Job System - Atomic job claiming prevents conflicts
- Secure Communication - Bearer token authentication with credential persistence
- Auto-Update - Automatic version checking and seamless updates with rollback support
- Multimodal Support - Full support for text, image, audio, and video modalities
- Server-Initiated Model Downloads - Server can request workers to download and setup new models
Quick Start¶
Install¶
# Core package
pip install -e .
# With all optional dependencies
pip install -e ".[all]"
# For development
pip install -e ".[dev]"
Configure¶
Run¶
Docker¶
# Build the image
docker build -t microdc_worker:latest .
# Run with GPU support
docker run --gpus all \
-e MICRODC_API_KEY="your-key" \
-e MICRODC_SERVER_URL="http://your-server:8000" \
microdc_worker:latest
Project Structure¶
src/
├── core/ # Core client logic
├── api/ # Server API communication
├── engines/ # Inference engine implementations
├── jobs/ # Job execution and queue management
├── models/ # Model registry and capabilities
├── processors/ # Document processing (Docling, Surya)
└── utils/ # Utilities and helpers
Learn More¶
- Ubuntu Setup - Production installation guide
- Architecture - Worker architecture details
- Engines - Inference engine documentation
- API Reference - Server API documentation
- Contributing - Contributor guidelines