Only detect CUDA_ARCHITECTURES when building Presto images#369
Open
misiugodfrey wants to merge 1 commit into
Open
Only detect CUDA_ARCHITECTURES when building Presto images#369misiugodfrey wants to merge 1 commit into
misiugodfrey wants to merge 1 commit into
Conversation
Move the nvidia-smi based CUDA_ARCHITECTURES detection into the build-target block so it only runs when an image is actually built. Previously a GPU-variant startup without a build would fail if nvidia-smi was unavailable, even though the value is only consumed by the docker compose build command. The invalid-options guard for --all-cuda-archs without a GPU variant stays as an early fast-fail.
devavret
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move the
nvidia-smi-basedCUDA_ARCHITECTURESdetection instart_presto_helper.shinto the build-target block so it only runs when a Presto image is actually built.Motivation
CUDA_ARCHITECTURESis only consumed by thedocker compose ... buildcommand, which lives inside theif (( ${#BUILD_TARGET_ARG[@]} ))block. Previously the detection ran unconditionally near the top of the script, so a GPU-variant startup with no build target (e.g. launching an already-built image) would still callnvidia-smiandexit 1if it wasn't available — a spurious failure, since the value isn't needed when not building.This particular failure was occurring when trying to run cpu-only images on cpu-only machines - which should be a supported case; and should not fail if nvidia-smi was not installed.
This decouples GPU hardware detection from cluster startup: you can launch GPU Presto on a host without
nvidia-smiunless you're building images.Details
--all-cuda-archswithout a GPU variant guard stays at the top as an early fast-fail argument validation.