Implement SystemResourcesWidget to show three labeled progress bars — Memory, CPU load, Disk — colored green /
orange / red at <75% / <90% / ≥90% usage.
AiiDAlab runs in a container, so host-wide numbers are meaningless. Read cgroup v2 limits when present:
- Memory:
memory.current minus inactive_file (the docker stats convention) against memory.max; when unlimited, fall back to the host
total via psutil with an explicit "no container limit, showing host total" note.
- CPU: 1-minute load average against the effective CPU count from
cpu.max (quota/period), falling back to os.cpu_count().
- Disk:
shutil.disk_usage of the home filesystem.
Each row degrades independently to an inline error message. A working reference can be found in #156.
Implement
SystemResourcesWidgetto show three labeled progress bars — Memory, CPU load, Disk — colored green /orange / red at <75% / <90% / ≥90% usage.
AiiDAlab runs in a container, so host-wide numbers are meaningless. Read cgroup v2 limits when present:
memory.currentminusinactive_file(thedocker statsconvention) againstmemory.max; when unlimited, fall back to the hosttotal via psutil with an explicit "no container limit, showing host total" note.
cpu.max(quota/period), falling back toos.cpu_count().shutil.disk_usageof the home filesystem.Each row degrades independently to an inline error message. A working reference can be found in #156.