MCPcopy Index your code
hub / github.com/dante-gpu/dante-cli-sdk

github.com/dante-gpu/dante-cli-sdk @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
261 symbols 448 edges 41 files 35 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DanteGPU - GPU Share VM Manager

DanteGPU is a sophisticated virtual machine management system designed specifically for AI workload distribution and GPU resource sharing. Built with Rust, it provides a robust, high-performance solution for managing VMs with GPU passthrough capabilities.

https://github.com/user-attachments/assets/3332166a-5dff-4398-b879-5965f29e33e0

Overview

DanteGPU serves as the core component of the GPU Share Platform, offering: - VM lifecycle management with GPU passthrough - Real-time resource monitoring - Automated GPU management - RESTful API interface - CLI tools for system management

Key Features

VM Management

  • Full lifecycle control (create, start, stop, delete)
  • GPU passthrough support
  • Resource allocation optimization
  • Template-based VM creation
  • Automated recovery mechanisms

GPU Management

  • Automated device discovery
  • Dynamic GPU allocation
  • Multi-vendor support (NVIDIA, AMD)
  • Performance metrics tracking
  • Resource isolation

Monitoring System

  • Real-time resource tracking
  • Performance metrics collection
  • GPU utilization monitoring
  • Memory usage tracking
  • Temperature and power monitoring

API & CLI Interface

  • RESTful API endpoints
  • Git-style CLI commands
  • Colored terminal output
  • Async command processing
  • Comprehensive error handling

🔧 Technical Architecture

Core Components

  1. Configuration Management
  2. Hierarchical config system
  3. Multiple override layers
  4. Environment variable support
  5. TOML-based configuration
  6. Secure secrets handling

  7. CLI System bash gpu-share ├── serve [--port] # API server management ├── vm # VM operations │ ├── list # List all VMs │ ├── create # Create new VM │ ├── start # Start VM │ ├── stop # Stop VM │ └── delete # Remove VM ├── gpu # GPU management │ ├── list # List GPUs │ ├── attach # Attach GPU to VM │ └── detach # Detach GPU from VM └── init # Generate config

  8. API Endpoints

  9. /api/v1/vms - VM management
  10. /api/v1/gpus - GPU operations
  11. /api/v1/metrics - Performance metrics
  12. RESTful design principles
  13. JSON payload support

  14. Monitoring System

  15. Resource metrics collection
  16. Performance tracking
  17. Health monitoring
  18. Metrics retention management
  19. Real-time alerts

🛠 Prerequisites

  • System Requirements
  • Linux kernel with IOMMU support
  • QEMU/KVM virtualization
  • Libvirt daemon
  • Compatible GPU (NVIDIA/AMD)
  • Rust toolchain (latest stable)

  • Optional Components

  • NVIDIA driver (for NVIDIA GPUs)
  • AMD driver (for AMD GPUs)
  • Docker (for containerized deployment)

📦 Installation

  1. System Setup ```bash # Install dependencies sudo apt install qemu-kvm libvirt-daemon-system

# Clone repository git clone https://github.com/yourusername/gpu-share-vm-manager cd gpu-share-vm-manager

# Build project cargo build --release ```

  1. Configuration ```bash # Generate default config ./target/release/gpu-share init

# Edit configuration (optional) vim config/default.toml ```

  1. Start Service bash # Run API server ./target/release/gpu-share serve --port 3000

Security Considerations

  • Input validation on all endpoints
  • Resource limits enforcement
  • Secure configuration management
  • Environment variable protection
  • API authentication (coming soon)
  • Resource isolation

Usage Examples

# Create new VM with GPU
gpu-share vm create --name ai-worker-01 --memory 8192 --vcpus 4 --gpu

# List available GPUs
gpu-share gpu list

# Attach GPU to VM
gpu-share gpu attach --vm-name ai-worker-01 --gpu-id 0

🔍 Monitoring & Metrics

  • CPU usage tracking
  • Memory utilization
  • GPU metrics
  • Utilization percentage
  • Memory usage
  • Temperature
  • Power consumption
  • Performance analytics
  • Resource optimization

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

📝 License

MIT License

Project Status

Currently in active development. Features being worked on: - Enhanced GPU scheduling - Multi-node support - Advanced monitoring - Security enhancements - Performance optimizations

📚 Documentation

Full documentation available in /docs: - Installation Guide - Configuration Reference - API Documentation - Development Guide - Security Guidelines


Remember: With great GPU power comes great electricity bills! 🔋

Extension points exported contracts — how you extend this code

ErrorRecovery (Interface)
(no doc) [2 implementers]
src/errors/mod.rs

Core symbols most depended-on inside this repo

create_container
called by 13
src/core/docker_manager.rs
delete_container
called by 10
src/core/docker_manager.rs
start_container
called by 9
src/core/docker_manager.rs
inspect_container
called by 8
src/core/docker_manager.rs
attach_gpu
called by 7
src/gpu/device.rs
stop_container
called by 6
src/core/docker_manager.rs
list_containers
called by 5
src/core/docker_manager.rs
detect_gpus
called by 4
src/gpu/device.rs

Shape

Method 124
Function 64
Class 60
Enum 12
Interface 1

Languages

Rust100%

Modules by API surface

src/gpu/device.rs38 symbols
src/gpu/passthrough.rs23 symbols
src/api/middleware/rate_limit.rs19 symbols
src/errors/mod.rs17 symbols
src/api/routes.rs16 symbols
src/monitoring/metrics.rs15 symbols
src/core/vm.rs15 symbols
src/core/docker_manager.rs14 symbols
tests/live_tests.rs12 symbols
src/core/libvirt.rs11 symbols
src/config/settings.rs9 symbols
tests/vm_tests.rs8 symbols

For agents

$ claude mcp add dante-cli-sdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact