Skip to content

FNNDSC/dbg-nvidia-smi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect Nvidia GPUs in a Container

Version MIT License Build

dbg-nvidia-smi is a ChRIS fs plugin wrapper around the command nvidia-smi, thus it requires an output positional directory argument. The plugin is useful to probe/test for available GPU(s) on a given host or ChRIS compute environment.

Usage

# To get detailed usage/man page instruction, pass a
# --man argument to the 'nvidia-smi-wrapper' in the
# examples below.

# Apptainer
singularity exec --nv docker://ghcr.io/fnndsc/dbg-nvidia-smi:lite \
    sh -c 'nvidia-smi-wrapper /tmp --cat'

# Typical Docker
docker run --rm --gpus all ghcr.io/fnndsc/dbg-nvidia-smi:lite \
    sh -c 'nvidia-smi-wrapper /tmp --cat'

# RHEL with SELinux
# Note: cannot use :lite image, must use :cuda image
podman run --rm --security-opt=no-new-privileges --cap-drop=ALL \
    --security-opt label=type:nvidia_container_t \
    ghcr.io/fnndsc/dbg-nvidia-smi:cuda \
    sh -c 'nvidia-smi-wrapper /tmp --cat'