GPU configuration
LabPod supports three GPU allocation modes. You configure each mode per physical GPU from the admin Resources page → GPU Policies.
Whole GPU (Container Device Interface, CDI)
Section titled “Whole GPU (Container Device Interface, CDI)”Each workspace that requests a GPU gets one full physical GPU. No sharing - one workspace per GPU at a time.
Prerequisites:
- NVIDIA driver 535.54.03 or newer installed and
nvidia-smiworking. nvidia-container-toolkitinstalled (the install script does this).- A Container Device Interface (CDI) spec at
/etc/cdi/nvidia.yaml(the script generates it vianvidia-ctk cdi generate).
Admin policy: Set the GPU policy to whole on the Resources page, or leave it on auto
(which allows whole-GPU requests by default).
When a workspace is started with GPU mode = Whole GPU, LabPod passes
--device nvidia.com/gpu=<index> to Podman. The workspace sees the full GPU.
Fractional GPU sharing
Section titled “Fractional GPU sharing”Multiple workspaces share a single physical GPU concurrently. Each workspace declares how much GPU memory and compute it needs; the server tracks allocations and refuses new workspaces that would exceed the physical GPU’s capacity.
Prerequisites:
Fractional GPU is off by default — the core install does not build the sharing library. A
GPU sharing runtime library (libvgpu.so) must be present on the host. The supported way to
build and install it is the public installer, which compiles HAMi-core inside a Podman container
(no host build tools required) and wires LABPOD_GPU_SHARING_LIB_PATH for you:
curl -fsSL https://labpod.ai/install.sh | sudo bash -s -- --with-hami# Run these as rootcurl -fsSL https://labpod.ai/install.sh | bash -s -- --with-hamiThe build pulls a ~3.3 GB CUDA image; it is a one-time, build-time cost you can reclaim with
podman image rm afterward.
To use a library you built or obtained elsewhere, point LabPod at it directly:
# In /etc/labpod/labpod.env:LABPOD_GPU_SHARING_LIB_PATH=/path/to/libvgpu.soThe server refuses to start with this variable set if the file doesn’t exist.
LabPod GPU hosts require NVIDIA driver 535.54.03 or newer.
Admin policy: Set the GPU policy for the target GPU to Fractional on the Resources page.
User workspace creation: The user selects GPU mode = Fractional GPU, then sets the memory (MB) and compute percentage they need. The server checks that the sum across all running workspaces on that GPU stays within physical limits.
Verify:
sudo labpod admin doctor# Look for: GPU sharing runtime: OK (or a "not found" error with the path)# Run these as rootlabpod admin doctor# Look for: GPU sharing runtime: OK (or a "not found" error with the path)MIG slices (A100/H100)
Section titled “MIG slices (A100/H100)”NVIDIA Multi-Instance GPU (MIG) partitions a physical GPU into independent slices at the hardware level. LabPod reads the current slice inventory and assigns one slice per workspace.
Prerequisites:
- An NVIDIA A100, H100, H200, or similar MIG-capable GPU.
- MIG mode enabled and slices pre-configured by the operator using
nvidia-smi:
# Example: enable MIG mode and create slices on GPU 0sudo nvidia-smi -i 0 -mig 1sudo nvidia-smi mig -i 0 -cgi 1g.10gb,1g.10gb,2g.20gb -C# Run these as root# Example: enable MIG mode and create slices on GPU 0nvidia-smi -i 0 -mig 1nvidia-smi mig -i 0 -cgi 1g.10gb,1g.10gb,2g.20gb -CAdmin policy: Set the GPU policy for the target GPU to mig. LabPod reads slices at
startup and on demand; no extra variable is needed.
MIG inventory source (optional override):
# In /etc/labpod/labpod.env:LABPOD_MIG_INVENTORY=nvidia-smi # default: parse nvidia-smi -LLABPOD_MIG_INVENTORY=none # no MIG on this hostUntracked GPU usage indicator
Section titled “Untracked GPU usage indicator”The admin Resources page shows a warning when nvidia-smi detects GPU compute processes that
don’t belong to any LabPod workspace. This usually means someone is running training directly
on the host (outside any container), or a process remained after a workspace was deleted.
GPU process inspector:
# In /etc/labpod/labpod.env:LABPOD_GPU_PROCESS_INSPECTOR=nvidia-smi # defaultLABPOD_GPU_PROCESS_INSPECTOR=none # disable the checkBypass at admission time (not recommended):
LABPOD_ALLOW_GPU_DRIFT=1 # skip the untracked-usage gate for new workspacesTo free a held GPU:
nvidia-smi --query-compute-apps=pid,process_name,gpu_uuid --format=csvsudo kill -TERM <pid># If still alive after 30 seconds:sudo kill -KILL <pid># Run these as rootnvidia-smi --query-compute-apps=pid,process_name,gpu_uuid --format=csvkill -TERM <pid># If still alive after 30 seconds:kill -KILL <pid>Verifying GPU configuration
Section titled “Verifying GPU configuration”sudo labpod admin doctor# Run these as rootlabpod admin doctordoctor checks that:
- The CDI spec exists at
/etc/cdi/nvidia.yaml(whole-GPU mode). - The fractional GPU sharing library is readable (if
LABPOD_GPU_SHARING_LIB_PATHis set). - The GPU process inspector (
nvidia-smi) is reachable for each enumerated GPU UUID.
For the full workstation preflight, use the install script’s --check mode.
GPU inventory source
Section titled “GPU inventory source”# In /etc/labpod/labpod.env:LABPOD_GPU_INVENTORY=nvidia-smi # default: enumerate GPUs via nvidia-smiLABPOD_GPU_INVENTORY=none # driverless host - no GPU workspacesUse none on a CPU-only workstation to skip nvidia-smi calls and suppress spurious errors
in the Resources page.