Skip to content

Zyora-Dev/zmesh

Repository files navigation

ZMESH - Decentralized GPU Mesh Network

The first inference GPU mesh network with VRAM slicing technology.

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    ZMESH Platform                           │
├─────────────────┬─────────────────┬─────────────────────────┤
│   Orchestrator  │ Provider Portal │   Connector Agent       │
│   (FastAPI)     │   (Next.js)     │   (Python + Tray)       │
│   Port 8000     │   Port 3000     │   Runs locally          │
└─────────────────┴─────────────────┴─────────────────────────┘

Components

1. Orchestrator (/orchestrator)

FastAPI backend that manages providers, jobs, and authentication.

cd orchestrator
pip install -r requirements.txt
uvicorn orchestrator.main:app --host 0.0.0.0 --port 8000 --reload

2. Provider Frontend (/provider-frontend)

Next.js dashboard for providers to manage their GPU offerings.

cd provider-frontend
npm install
npm run dev

3. Connector Agent (/provider-app)

Python application that runs on provider machines to share GPU resources.

See Connector Setup Guide below.


Connector Manual Setup

Prerequisites

  • Python 3.10+
  • pip
  • GPU with CUDA support (optional, CPU fallback available)

Installation

  1. Clone the repository

    git clone https://github.com/Zyora-Dev/zmesh.git
    cd zmesh/provider-app
  2. Create virtual environment

    python -m venv .venv
    source .venv/bin/activate  # macOS/Linux
    # or
    .venv\Scripts\activate     # Windows
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure API key

    Get your API key from the Provider Dashboard and set it:

    export ZMESH_API_KEY="your-api-key-here"

    Or create a .env file:

    ZMESH_API_KEY=your-api-key-here
    ZMESH_ORCHESTRATOR_URL=http://localhost:8000
    
  5. Run the connector

    python main.py

Quick Start (Double-click Launchers)

For convenience, platform-specific launchers are included:

Platform File Action
macOS Start ZMESH Connector.command Double-click
Windows Start ZMESH Connector.bat Double-click
Linux Start ZMESH Connector.sh chmod +x then run

The launcher automatically:

  • Creates a Python virtual environment
  • Installs dependencies
  • Prompts for your API key
  • Starts the connector with system tray icon

Configuration Options

Environment Variable Default Description
ZMESH_API_KEY - Your provider API key (required)
ZMESH_ORCHESTRATOR_URL http://localhost:8000 Orchestrator endpoint
ZMESH_VRAM_ALLOCATION 50 Percentage of VRAM to share

System Tray

Once running, the connector appears in your system tray with options to:

  • View connection status
  • Adjust VRAM allocation
  • Pause/resume sharing
  • Open dashboard
  • Quit

API Documentation

When the orchestrator is running, visit:


Development

Project Structure

zmesh/
├── orchestrator/           # FastAPI backend
│   ├── api/               # API routes
│   ├── core/              # Auth, config, security
│   ├── models/            # SQLAlchemy models
│   └── main.py            # App entry point
├── provider-frontend/      # Next.js dashboard
│   ├── src/app/           # App router pages
│   └── src/components/    # React components
└── provider-app/          # Connector agent
    ├── core/              # Hardware detection, tray
    ├── agent.py           # API client
    └── main.py            # Entry point

Running All Services

# Terminal 1: Backend
cd orchestrator && uvicorn orchestrator.main:app --reload --port 8000

# Terminal 2: Frontend
cd provider-frontend && npm run dev

# Terminal 3: Connector (optional, for testing)
cd provider-app && python main.py

License

MIT

About

ZAgent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors