exec-env-check

Detects GPU availability, Docker support, and Slurm access to determine the execution scenario.

14.5k|2.7k|Updated Aug 16, 2023
One-click install
npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill exec-env-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exec-env-check
Source: https://github.com/NVIDIA/TensorRT-LLM/tree/main/.claude/skills/exec-env-check
Command: npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill exec-env-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Before launching a GPU workload, you need to know whether the current machine can run it locally, inside Docker, or through a Slurm cluster. This Skill probes the environment and returns a structured execution scenario with GPU counts and hardware details, removing guesswork from workload placement.

Core Features & Use Cases

  • Local GPU Detection: Runs nvidia-smi with a timeout to count available GPUs and identify the device type (e.g., B200, H100, A100).
  • Docker vs Direct Execution: Checks whether the Docker CLI and daemon are usable to distinguish satisfied, local, docker from satisfied, local, direct scenarios.
  • Slurm Cluster Resolution: On login nodes without local GPUs, delegates hostname-based cluster identification to the internal-env-info skill to obtain GPU type, GPUs per node, and default storage paths.
  • Use Case: An orchestrator needs to schedule a 4-GPU TensorRT-LLM benchmark. It calls this Skill with required_devices: 4 and receives a scenario such as satisfied, slurm, local along with cluster name and per-node GPU count to route the job correctly.

Quick Start

Check whether this machine can run a workload requiring 4 GPUs and report the execution scenario, GPU count, and device type.

Frequently Asked Questions about exec-env-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check GPU availability before running a workload?

Run nvidia-smi with a timeout to query GPU names and memory, then count the returned lines as available GPUs. This Skill automates that check and compares the count against your required_devices input to decide the execution scenario.

How to detect if Docker is usable for GPU jobs?

Verify both that the Docker CLI exists and that the daemon responds to docker info within a short timeout. If both succeed the scenario is satisfied, local, docker; otherwise it falls back to satisfied, local, direct when GPUs are present.

Can I detect Slurm cluster GPU type from a login node?

Yes, by capturing the hostname and delegating cluster identification to the internal-env-info skill, which maps hostname patterns to cluster names, GPU types, and GPUs per node. No srun allocation on compute nodes is needed.

What happens if the internal-env-info skill is not installed?

The scenario falls back to not_satisfied with null values for device type, cluster name, and storage paths. This is treated as a normal outcome, not an error, and no compute-node probing via srun is attempted.

Why does nvidia-smi hang and how is it handled?

nvidia-smi can hang on systems with driver issues or inaccessible GPUs. The Skill wraps the call in a 5-second timeout and treats failure or empty output as zero available GPUs, then proceeds to Slurm detection.