DEV Community

Cover image for Configuring NVIDIA MIG: Technical Walkthrough for Bare-Metal GPU Partitioning published: true
Ethan Vance
Ethan Vance

Posted on Originally published at migservers.com

Configuring NVIDIA MIG: Technical Walkthrough for Bare-Metal GPU Partitioning published: true

High-capacity GPUs (like the A100, H100, or Blackwell) often sit underutilized in bare-metal environments. Software-based time slicing lacks hardware-level resource guarantees.

NVIDIA Multi-Instance GPU (MIG) solves this by partitioning a single physical card into independent instances at the hardware level, giving each partition dedicated compute, memory, and bandwidth.

Here is a quick step-by-step CLI walkthrough on Ubuntu 24.04:

1. Install Drivers and Verify Support

sudo ubuntu-drivers install
nvidia-smi -q
Enter fullscreen mode Exit fullscreen mode

Look for the MIG Mode section in the output to confirm hardware support. (Install nvidia-container-toolkit if you plan to run Docker).

2. Enable MIG Mode

Ensure no active workloads are attached, then enable MIG mode on GPU 0:

sudo nvidia-smi -i 0 -mig 1

3. List Supported Profiles

Query the supported resource layouts for your GPU model:

nvidia-smi mig -lgip

4. Partition the GPU

Create GPU Instances (GI) and Compute Instances (CI) using your chosen profile string:

sudo nvidia-smi mig -cgi 2g.48gb,2g.48gb -C
Enter fullscreen mode Exit fullscreen mode

Verify active partitions using nvidia-smi mig -lgi.

5. Target MIG Instances in Docker

List generated UUIDs:

nvidia-smi -L
Enter fullscreen mode Exit fullscreen mode

Pass the specific MIG UUID directly to your Docker container:

docker run --rm -it --gpus '"device=MIG-af414487-fcaa-5f42-b210-6f614c9cf780"' nvcr.io/nvidia/pytorch: nvidia-smi
Enter fullscreen mode Exit fullscreen mode

6. Reset Partitions

To revert to single-instance operation:

sudo nvidia-smi mig -dci
sudo nvidia-smi mig -dgi
sudo nvidia-smi -i 0 -mig 0
Enter fullscreen mode Exit fullscreen mode

Managing bare-metal lifecycle, drivers, and hardware provisioning at scale takes operational bandwidth. At MIG servers, we provide pre-configured, dedicated GPU hardware optimized for partitioned AI workloads out of the box.

Top comments (0)