MIGOps is a Python CLI for safe NVIDIA Multi-Instance GPU (MIG) operations on Linux GPU hosts.
It complements NVIDIA's native MIG tooling with workload-aware safety checks, smart partition recommendations, configuration planning, snapshots, drift detection, and safe apply workflows.
MIGOps running on a real NVIDIA H100 GPU host on a bare-metal Dell PowerEdge R770 running Ubuntu 26.04 LTS 🐧.

- GPU and MIG status
- MIG profile discovery
- Active GPU/MIG workload detection
- Smart equal-memory MIG splitting
- Easy MIG creation and destruction
- MIG mode enable/disable
- Advanced GI and CI management
- YAML desired-state configuration
- Validate, diff, and plan workflows
- Snapshots and restore
- Safe apply with workload checks and dry-run
- JSON output for automation
- Automated tests and GitHub Actions CI
- Linux for real MIG operations
- Python 3.9+
- NVIDIA driver
nvidia-smi- NVIDIA MIG-capable GPU for MIG operations
Development and parser tests can run without an NVIDIA GPU.
Install MIGOps with a single command:
curl -fsSL https://raw.githubusercontent.com/aminmsalimi/migops/main/install.sh | bashThe installer downloads MIGOps, creates an isolated Python virtual environment, installs the CLI, and makes migops available from the command line. When sudo is available, it also exposes the command through /usr/local/bin so privileged MIG operations work directly.
git clone https://github.com/aminmsalimi/migops.git
cd migops
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .Inspect the system:
migops status
migops profiles
migops usersRecommend an equal MIG split:
migops recommend gpu 0 4Preview applying it:
sudo migops split gpu 0 4 --dry-runApply it:
sudo migops split gpu 0 4 --yesMIGOps selects from MIG profiles reported by the installed NVIDIA driver rather than inventing unsupported partition sizes.
Enable or disable MIG mode:
sudo migops enable gpu 0
sudo migops disable gpu 0Create complete MIG instances:
sudo migops create gpu 0 3g.40gb
sudo migops create gpu 0 3g.40gb --count 2Destroy them safely:
sudo migops destroy gpu 0 --gi 2
sudo migops destroy gpu 0 --allAdvanced GI and CI commands are also available through:
migops gi --help
migops ci --helpExample:
version: 1
gpus:
- gpu: "0"
mig_enabled: true
instances:
- profile: "3g.40gb"
count: 1
- profile: "2g.20gb"
count: 1Validate, compare, and plan:
migops validate config.yaml
migops diff config.yaml
migops plan config.yamlPreview and apply:
sudo migops apply config.yaml --dry-run
sudo migops apply config.yamlSave the current MIG configuration:
migops snapshotRestore a previous snapshot:
sudo migops restore snapshot.yaml --dry-run
sudo migops restore snapshot.yamlMIGOps is intentionally conservative:
- detects active GPU workloads before destructive changes
- supports
--dry-run - requires
--yesfor desired-state changes - creates a snapshot before real apply operations
- removes CIs before GIs
- verifies the final configuration after apply
- leaves final hardware validation to the NVIDIA driver
python -m unittest discover -s tests -vGitHub Actions runs the test suite automatically on pushes and pull requests.
MIGOps v0.1.0 is an early alpha release.
Core workflows are implemented and covered by automated tests. Real-world validation across different NVIDIA MIG-capable GPU generations and driver versions is still ongoing.