You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
task run: sizes GPU families and runs --gpus all, but has no way to select a GPU AMI (no --ami flag, no TaskSpec field) → driverless host, NVML fails at runtime #601
spawn task run --spec will size a GPU instance and run docker run --gpus all, but has no way to select a GPU-capable AMI — no --ami flag, and no AMI/OS field in the TaskSpec. It resolves the default (non-GPU) AL2023 AMI, so the container's --gpus all lands on a host with no NVIDIA driver and GPU init (NVML) fails at runtime, inside the container, after a clean-looking launch.
This is the task run analog of #356 / #384, but those were both on the launch path — and launch has an --ami escape hatch (passing --ami <DLAMI> explicitly works; that is the current workaround). The task run / TaskSpec path has no escape hatch at all.
Reproduction
task run's own help states it passes GPUs through:
If spec.container is set, the command runs inside that image ... GPUs passed with --gpus all.
and sizes via truffle:
Sizes the cheapest instance type that fits the resource request (via truffle)
$ spawn task run --spec gpu_repro.json --region us-west-2 --dry-run
Task: gpu-ami-repro
Instance: g5.2xlarge (8 vCPU, 32 GiB, $1.2120/hr on-demand)
chosen as cheapest of 7 matching type(s)
Root disk: AMI default (resources.disk_gib not set; ...)
So truffle correctly sizes a g5.2xlarge (a GPU box), and the AMI is "AMI default" — the non-GPU AL2023 (same driverless AMI #356 describes). docker run --gpus all on that host cannot initialize the GPU.
The full task run flag set confirms there is no override:
--dry-run --poll-interval --region --spec --wait
No --ami. And the TaskSpec resources block (cpu, memory_gib, architecture, families, and instance_type per #413) has no AMI/OS field.
Ask
Any one of these closes the gap, in rough order of preference:
Add an AMI field to the TaskSpec (e.g. resources.ami or resources.image_os: gpu) so a spec can pin the DLAMI the way launch --ami does — this also gives task run parity with launch generally, not just for GPU.
At minimum, fail fast with a clear message when a spec sizes a GPU family with a container and no GPU AMI is available ("GPU task-runs need a GPU AMI; TaskSpec has no AMI field — use spawn launch --ami for now"), instead of booting the wrong AMI and failing at runtime inside the container.
Workaround (in use)
Run the GPU workload via spawn launch <name> --ami <DLAMI> --command 'docker run --gpus all ...' instead of task run. Works, but it is the raw-instance path — it loses the TaskSpec staging/completion/sizing model that task run exists to provide, so GPU recipes can't use the same shape as every CPU recipe until task run can reach a GPU AMI.
Real-GPU validation of the fix (spawn v0.111.0, g5.xlarge/us-west-2) confirmed the AMI selection is now correct — the instance boots on the AL2023 NVIDIA DLAMI and --dry-run shows it explicitly. But the end-to-end GPU-in-container path still fails: docker run --gpus all doesn't inject the driver, so nvidia-smi isn't in the container (exit 127). Root cause: the host is missing the NVIDIA Container Toolkit. Tracked as #606 (the runtime follow-on). #605 stands as the AMI-selection + visibility fix.
Activity
scttfrdmn commentedon Sep 17, 2026
Real-GPU validation of the fix (spawn v0.111.0, g5.xlarge/us-west-2) confirmed the AMI selection is now correct — the instance boots on the AL2023 NVIDIA DLAMI and
--dry-runshows it explicitly. But the end-to-end GPU-in-container path still fails:docker run --gpus alldoesn't inject the driver, sonvidia-smiisn't in the container (exit 127). Root cause: the host is missing the NVIDIA Container Toolkit. Tracked as #606 (the runtime follow-on). #605 stands as the AMI-selection + visibility fix.