- Created gpu-service application structure - Added pyproject.toml with FastAPI, SQLModel, asyncpg, and aitbc-core dependencies - Implemented main.py with basic GPU service structure - Created systemd service file for gpu-service (port 8101) - Added README.md with installation and configuration instructions - Documented future work needed for full GPU extraction This starts Phase 4.3: Extract GPU Service (foundation created, full extraction requires additional work)
AITBC GPU Service
Manages GPU resource operations.
Installation
cd /opt/aitbc
poetry install --with gpu-service
Database Setup
Create a separate database for the GPU service:
CREATE DATABASE aitbc_gpu;
CREATE USER aitbc_gpu WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE aitbc_gpu TO aitbc_gpu;
Running
# Development
python -m gpu_service.main
# Production (systemd)
sudo systemctl start gpu-service
sudo systemctl enable gpu-service
Endpoints
GET /health- Health checkGET /gpu/status- Get GPU status
Future Work
To fully extract GPU functionality from coordinator-api, the following needs to be done:
- Extract domain models: Copy GPU-related domain models from coordinator-api
- Extract services: Copy GPU-related services from coordinator-api
- Extract storage layer: Set up separate database session management
- Extract routers: Copy GPU routers (edge_gpu.py, gpu_multimodal_health.py, miner.py)
- Update coordinator-api: Remove GPU-related code
- Update gateway: GPU service is already configured in gateway
Service Configuration
- Port: 8101
- Database: aitbc_gpu
- Gateway route: /gpu/*