Tao Run On Virtualenv
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Tool integration
- Automation and integrations
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The tao-run-on-virtualenv skill provides a mechanism to run Python scripts natively using an existing local virtual environment. It bypasses containerization, making it suitable for environments where Docker is unavailable or for rapid, lightweight experimentation. The skill implements a standard four-verb interface (submit, status, logs, cancel) to manage the lifecycle of local processes, ensuring durable state tracking and process group cleanup.
What it does
- Executes Python scripts directly using a specified virtualenv interpreter.
- Manages job lifecycles with submit, status, logs, and cancel operations.
- Provides durable on-disk state tracking for job records.
- Ensures process group cleanup to prevent orphaned processes.
- Supports environment variable injection for secure configuration handling.
- Integrates with local job recording systems for auditability.
When to use it
- When running plain Python scripts that do not require containerized environments.
- When Docker or other container runtimes are unavailable on the host.
- When minimizing startup overhead for fast HPO or AutoML trial loops.
- When working on single-node development environments.
Advantages
- Eliminates container startup latency and dependency management overhead.
- Operates natively on the host system using existing virtual environments.
- Provides robust process lifecycle management and cleanup.
- Supports secure handling of environment variables without exposing them in command arguments.
Usage examples
- “Run my training script train.py in the local virtualenv located at /opt/venv.”
- The agent initializes the job record, configures the runner to use the specified venv, and launches the training process in a detached state.
- “Check the status of my current virtualenv training job.”
- The agent queries the runner's durable state files and returns the current status (e.g., RUNNING, COMPLETE, or ERROR).
- “Cancel the active training job running in the virtualenv.”
- The agent triggers the cancellation process, which uses a durable group guardian to safely terminate the process group.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/tao-run-on-virtualenv/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-run-on-virtualenv.zip -d .agents/skills
Documentation by NVIDIA Corporation
Virtualenv — docker-free local Python execution
Standalone install? If this session was not initialized by the TAO skill bank plugin, run the
tao-setupskill first (host preflight, credentials, cross-skill discovery).
The virtualenv platform runs a Python script natively in an existing venv —
as an argv vector whose first element is <venv>/bin/python, never through a
shell, never activating anything. The vendored runner
(references/virtualenv_runner.py) is this platform's "native CLI" — the role
docker/kubectl/sbatch play elsewhere — and owns only the process
lifecycle. Job records stay with tao_job_record.py; specs are authored by the
agent, exactly like every other platform.
When to use
The workload is a plain Python script (its dependencies pip-installed in a venv), not a TAO container action.
No docker on the host, or container startup cost isn't worth it (fast smokes, AutoML trial loops over lightweight models).
Single node only. For TAO container actions use
tao-run-on-docker; for clusters use-slurm/-kubernetes.
Preflight
# 1. The venv is real and has an executable interpreter.
[ -f "$VENV/pyvenv.cfg" ] && [ -x "$VENV/bin/python" ] || echo "MISSING: $VENV is not a venv"
# 2. The script's top-level imports resolve inside it (catches wrong-venv early);
# substitute the real modules your script imports.
"$VENV/bin/python" -c "import torch" || echo "MISSING: script dependency not in $VENV"
# 3. GPU visibility only if the script needs CUDA.
nvidia-smi >/dev/null 2>&1 || echo "note: no GPU visible (fine for CPU scripts)"No credentials are required by the platform itself; model-specific env vars
(e.g. HF_TOKEN) pass through by NAME with -e (values never land on argv).
Storage
Tier A by definition — everything is local paths. Datasets must already be
on local disk (stage with tao-data-io first if they live in S3). Outputs land
in the job record's results_dir, which IS the runner's --job-dir.
Execution — the four verbs
$BANK = ${TAO_SKILL_BANK_PATH}; $RUNNER =
$BANK/skills/platform/tao-run-on-virtualenv/references/virtualenv_runner.py.
submit
Author the spec (if the script takes one) at a local path — nested dicts, never flat dotted keys — and lint the assembled command with
redact_secrets.py lint.Open the record — mints the id, binds
results_dirBEFORE launch:JOB_ID=$("$BANK/scripts/tao_job_record.py" open --platform virtualenv \ --image "$VENV/bin/python" --network-arch "$ARCH" --action "$ACTION" \ --storage-tier A --results-root "$RESULTS_ROOT") RESULTS_DIR="$RESULTS_ROOT/$JOB_ID"Launch detached (the runner writes a durable wrapper that gates start, records identity, and cleans up the process group on exit):
set -a; source /path/to/.env; set +a # omit if already exported python3 "$RUNNER" submit --job-dir "$RESULTS_DIR" --venv "$VENV" \ --script train.py --job-id "$JOB_ID" --config-path "$SPEC" \ --arg train --arg=--config={config_path} --arg=--out={results_dir} \ --gpu-ids 0 -e HF_TOKENPlaceholders
{config_path}{results_dir}{job_id}render inside--argtokens. A token starting with-must use the--arg=TOKENform (argparse).--gpu-idssetsCUDA_VISIBLE_DEVICES;--gpus 0hides GPUs; neither reserves anything.Record RUNNING with the pid the runner printed:
"$BANK/scripts/tao_job_record.py" mark "$JOB_ID" --state RUNNING --backend-ref "pid:<pid>"
One submit per job dir — a retry gets a NEW record (--retry-of), never a
re-submit into the same dir.
status
python3 "$RUNNER" status --job-dir "$RESULTS_DIR" # {"status": "...", ...}Prints the fixed vocabulary directly: PENDING RUNNING COMPLETE ERROR CANCELED UNKNOWN — no mapping table needed. Status is derived from durable files
(exit_status.json, launcher identity) and is safe to poll from any process,
any time, including after reboots of the polling agent. On a terminal status,
mark the record.
logs
python3 "$RUNNER" logs --job-dir "$RESULTS_DIR" --tail 200cancel
python3 "$RUNNER" cancel --job-dir "$RESULTS_DIR"
"$BANK/scripts/tao_job_record.py" mark "$JOB_ID" --state CANCELED --source agentCancel marks first (a not-yet-started wrapper self-cancels at its start gate),
then uses a durable group guardian and Linux pidfds for SIGTERM→SIGKILL. The
guardian prevents PGID reuse during discovery; a pidfd pins each target across
the observation/signal boundary. already_terminal in the reply means the job
finished before the cancel — mark the record with the status it reports instead.
Platform caveats
Linux active cancellation. Safe active-process termination requires procfs,
pidfd_open, andpidfd_send_signal. On another POSIX host theps/pgrepfallback can prove a group is empty, but cancellation of active members returnsUNKNOWNinstead of risking a reused numeric PID or PGID.No multi-node, no image resolution — there is no container. The "image" recorded is the venv's interpreter path.
The runner never downloads anything. Remote inputs are the agent's job to stage first (
tao-data-io).
Files
- ATTRIBUTION.mdAdded by AutoGineer933 B
- BENCHMARK.md7.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md6.3 KiB
- config/skillspector-baseline.yaml1.7 KiB
- evals/evals.json1022 B
- references/skill_info.yaml605 B
- references/tests/test_virtualenv_runner.pyScript31.7 KiB
- references/virtualenv_group_supervisor.pyScript15.9 KiB
- references/virtualenv_runner.pyScript46.2 KiB
- skill-card.md4.7 KiB
- skill.oms.sig5.7 KiB
evals/evals.json
[
{
"id": "tao-run-on-virtualenv-basic",
"question": "A user request: \"Run my training script directly in my local venv — I don't have docker.\" Identify which TAO skill applies and, reading only that skill's documentation, outline the four-verb steps it prescribes. Do NOT run any commands, scripts, web searches, or other tools — describe the plan only.",
"expected_skill": "tao-run-on-virtualenv",
"expected_script": null,
"ground_truth": "Identify tao-run-on-virtualenv as the docker-free local execution platform and summarize its documented flow: open a job record binding results_dir, submit via references/virtualenv_runner.py with the venv + script, poll status/logs, cancel via the runner, and mark the record — without executing anything.",
"expected_behavior": [
"Identifies tao-run-on-virtualenv as the relevant skill",
"Outlines record-then-launch and the four verbs over virtualenv_runner.py",
"Does not run commands, scripts, or web searches"
]
}
]
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs Python, Needs Node.js
The author says: Requires a local Python virtualenv (pyvenv.cfg + bin/python) with the training script's dependencies installed. Linux with procfs and pidfd signaling is required for active job cancellation; other POSIX hosts can run jobs and prove empty groups but fail closed rather than signal numeric process IDs. No nvidia-tao-sdk, no docker.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Corporation
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/tao-run-on-virtualenv · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-run-on-virtualenv.zip