import { Badge } from '@/components/ui'; import { AmaruWiringPanel } from '@/components/AmaruLive'; import { Cpu, Layers, MonitorDot, Network, Server, Workflow, Zap, } from 'lucide-react'; import { ResponsiveContainer, AreaChart, Area, XAxis, YAxis, Tooltip, } from 'recharts'; interface ClusterNode { id: string; name: string; type: 'gpu' | 'cpu' | 'tpu'; hardware: string; status: 'active' | 'draining' | 'offline'; utilization: number; memory: string; jobs: number; uptime: string; } const CLUSTER_NODES: ClusterNode[] = [ { id: 'n1', name: 'lambda-h100-0', type: 'gpu', hardware: 'NVIDIA H100 SXM', status: 'active', utilization: 87, memory: '72/80 GB', jobs: 4, uptime: '14d 6h' }, { id: 'n2', name: 'lambda-h100-1', type: 'gpu', hardware: 'NVIDIA H100 SXM', status: 'active', utilization: 93, memory: '76/80 GB', jobs: 5, uptime: '14d 6h' }, { id: 'n3', name: 'lambda-a100-0', type: 'gpu', hardware: 'NVIDIA A100 80G', status: 'active', utilization: 62, memory: '48/80 GB', jobs: 3, uptime: '31d 2h' }, { id: 'n4', name: 'lambda-a100-1', type: 'gpu', hardware: 'NVIDIA A100 80G', status: 'draining', utilization: 34, memory: '22/80 GB', jobs: 1, uptime: '31d 2h' }, { id: 'n5', name: 'k8s-worker-0', type: 'cpu', hardware: 'AMD EPYC 9654', status: 'active', utilization: 41, memory: '128/256 GB', jobs: 12, uptime: '62d 18h' }, { id: 'n6', name: 'k8s-worker-1', type: 'cpu', hardware: 'AMD EPYC 9654', status: 'active', utilization: 58, memory: '164/256 GB', jobs: 9, uptime: '62d 18h' }, { id: 'n7', name: 'slurm-batch-0', type: 'cpu', hardware: 'Intel Xeon w9-3595X', status: 'active', utilization: 78, memory: '384/512 GB', jobs: 24, uptime: '7d 4h' }, { id: 'n8', name: 'dstack-spot-0', type: 'gpu', hardware: 'NVIDIA H200 141G', status: 'active', utilization: 96, memory: '134/141 GB', jobs: 2, uptime: '0d 8h' }, ]; const ORCHESTRATORS = [ { name: 'Kubernetes', status: 'active', nodes: 4, icon: , desc: 'Managed cluster with GPU scheduling' }, { name: 'Slurm', status: 'active', nodes: 2, icon: , desc: 'HPC batch workloads' }, { name: 'dstack', status: 'active', nodes: 1, icon: , desc: 'Open-source AI dev, spot instances' }, { name: 'Lambda Cloud', status: 'active', nodes: 1, icon: , desc: 'On-demand H200 inference' }, ]; const UTILIZATION_HISTORY = Array.from({ length: 48 }, (_, i) => ({ t: `${Math.floor(i / 2)}:${i % 2 === 0 ? '00' : '30'}`, gpu: Math.floor(60 + Math.sin(i / 6) * 25 + Math.random() * 10), cpu: Math.floor(40 + Math.cos(i / 8) * 20 + Math.random() * 8), mem: Math.floor(55 + Math.sin(i / 4) * 15 + Math.random() * 5), })); function StatusDot({ status }: { status: string }) { const color = status === 'active' ? 'bg-green-500' : status === 'draining' ? 'bg-yellow-500' : 'bg-red-500'; return
; } export default function ComputePage() { const totalGpu = CLUSTER_NODES.filter(n => n.type === 'gpu').length; const totalCpu = CLUSTER_NODES.filter(n => n.type === 'cpu').length; const avgUtil = Math.round(CLUSTER_NODES.reduce((s, n) => s + n.utilization, 0) / CLUSTER_NODES.length); const totalJobs = CLUSTER_NODES.reduce((s, n) => s + n.jobs, 0); return (

AMARU · COMPUTE · ORCHESTRATION

Compute Orchestration

GPU/CPU cluster management across Kubernetes, Slurm, dstack, and Lambda Cloud. Inspired by Lambda AI's flexible orchestration architecture.

{ORCHESTRATORS.map(o => (
{o.icon}

{o.name}

{o.desc}

{o.nodes} node{o.nodes > 1 ? 's' : ''}

))}

{totalGpu}

GPU Nodes

{totalCpu}

CPU Nodes

{avgUtil}%

Avg Util

{totalJobs}

Active Jobs

Cluster Utilization · 24h

GPU CPU MEM
`${v}%`} /> { if (active && payload?.length) { return (

{label}

GPU: {payload[0]?.value}%

CPU: {payload[1]?.value}%

MEM: {payload[2]?.value}%

); } return null; }} />

Node Inventory

{CLUSTER_NODES.map(n => ( ))}
Node Hardware Status Util Memory Jobs Uptime
{n.name} {n.hardware} {n.status} 80 ? '#fb923c' : n.utilization > 60 ? '#facc15' : '#4ade80' }}> {n.utilization}% {n.memory} {n.jobs} {n.uptime}
); }