Skip to main content

A lightweight napari dock widget for monitoring CPU, RAM, GPU, and VRAM during local AI and image analysis workflows.

Project description

napari-hardware-monitor

Lightweight local hardware monitoring for napari.

napari-hardware-monitor adds a compact dashboard dock for watching CPU, system memory, GPU activity, and GPU memory while image-analysis and local AI workflows run. It is designed for users who want immediate visibility into whether napari, segmentation models, vision models, or large image data are putting pressure on the machine.

napari-hardware-monitor widget

First Release

Version 0.1.0 focuses on a small, reliable monitor:

  • compact dark dashboard with gauge cards and short history traces
  • CPU utilization
  • optional per-core CPU utilization
  • system memory usage
  • NVIDIA GPU utilization through nvidia-smi
  • NVIDIA VRAM usage when reported by the driver
  • GPU temperature and power draw
  • Start / Pause monitoring
  • refresh interval selector
  • Float button for detaching the monitor dock when napari exposes a dock container
  • Copy Snapshot for bug reports, benchmarking notes, or reproducibility records

Per-core CPU detail is collapsed by default. The main view stays focused on the common question: is the workflow limited by CPU, RAM, GPU, or VRAM?

Why This Plugin Exists

Local image analysis is increasingly hardware-dependent. When a user loads a large TIFF or OME-Zarr, runs SAM, Cellpose, StarDist, a local Ollama vision model, or another GPU-backed workflow, they often need to know:

  • Is the GPU actually being used?
  • Is VRAM full?
  • Is system RAM becoming the bottleneck?
  • Is the CPU busy while the GPU is idle?
  • Did a model finish, stall, or continue running in the background?

This plugin gives that signal directly inside napari without opening a separate system monitor.

Scope

napari-hardware-monitor is a hardware visibility plugin. It is not a profiler, model launcher, training manager, benchmark suite, or process attribution tool.

It is meant to sit beside tools such as:

  • napari-chat-assistant: local text assistant
  • napari-vision-assistant: local image + text vision assistant
  • segmentation and model plugins that consume CPU/GPU resources

The values are system-level. They tell users what the machine is doing, not which exact plugin or process caused the load.

GPU Support

NVIDIA GPU monitoring uses nvidia-smi.

If nvidia-smi is unavailable, the plugin still shows CPU and system memory and displays a clear no-GPU fallback. Multi-GPU systems are summarized as aggregate VRAM, maximum GPU utilization, maximum temperature, and total power draw.

Some platforms or drivers may report GPU activity but not VRAM totals. In that case the GPU memory card shows N/A rather than pretending the value is known.

Usage

Open napari and choose:

Plugins > Hardware Monitor

Controls:

  • Start: begin automatic polling.
  • Pause: stop polling while keeping the last values visible.
  • 1s / 2s / 5s: choose refresh interval. 2s is the default balance between responsiveness and overhead.
  • Float: detach the monitor dock when the napari dock container supports it.
  • Copy: copy a plain-text hardware snapshot.
  • CPU cores: expand optional per-core CPU usage.

Installation

pip install napari-hardware-monitor

Development

git clone https://github.com/wulinteousa2-hash/napari-hardware-monitor.git
cd napari-hardware-monitor
pip install -e ".[test]"
pytest -q
napari

Design Notes

  • Polling runs off the Qt UI thread so a slow nvidia-smi call does not freeze the dock.
  • The dashboard uses Qt painting directly and avoids heavy plotting dependencies.
  • The dashboard keeps only a short in-memory history, so it stays lightweight during long napari sessions.
  • Individual CPU cores are available as an optional detail panel, not as default dashboard clutter.
  • The first release intentionally stays small: clear local hardware visibility is the core value.

Release Notes

0.1.0

Initial release.

  • Added compact napari dock widget.
  • Added CPU, RAM, GPU, and VRAM dashboard cards.
  • Added gauge and sparkline visualizations.
  • Added optional per-core CPU panel.
  • Added asynchronous hardware polling.
  • Added NVIDIA GPU support through nvidia-smi.
  • Added multi-GPU summary behavior.
  • Added dock float action, refresh control, pause/start, and copy snapshot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_hardware_monitor-0.1.0.tar.gz (73.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_hardware_monitor-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file napari_hardware_monitor-0.1.0.tar.gz.

File metadata

  • Download URL: napari_hardware_monitor-0.1.0.tar.gz
  • Upload date:
  • Size: 73.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for napari_hardware_monitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8194937a3f65baf08b98e6169a2d419add9aec505a4e39bb913449d3df16410b
MD5 2ff24367144efadde63921caa1a35b76
BLAKE2b-256 b3fcbb1f9118be7868789be6d8f85d5892f4a692be5e78698107742f09d6b7f3

See more details on using hashes here.

File details

Details for the file napari_hardware_monitor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_hardware_monitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f1bf3bf5ebef79bc5223b03c1cb95a134d546e1d1a368bcfb3b800e6232557e
MD5 9cff6abf15292c13cf4d05e496d3fe65
BLAKE2b-256 431abe4826c8eb33fea71dd54deaf23f3d473e379195d918281465f7e8694844

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page