Skip to content

Only detect CUDA_ARCHITECTURES when building Presto images#369

Open
misiugodfrey wants to merge 1 commit into
mainfrom
misiug/pullProcess
Open

Only detect CUDA_ARCHITECTURES when building Presto images#369
misiugodfrey wants to merge 1 commit into
mainfrom
misiug/pullProcess

Conversation

@misiugodfrey

@misiugodfrey misiugodfrey commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Move the nvidia-smi-based CUDA_ARCHITECTURES detection in start_presto_helper.sh into the build-target block so it only runs when a Presto image is actually built.

Motivation

CUDA_ARCHITECTURES is only consumed by the docker compose ... build command, which lives inside the if (( ${#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 call nvidia-smi and exit 1 if 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-smi unless you're building images.

Details

  • Detection logic moved inside the build block, next to its only consumer.
  • The --all-cuda-archs without a GPU variant guard stays at the top as an early fast-fail argument validation.

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.
@misiugodfrey misiugodfrey requested a review from a team as a code owner July 3, 2026 16:22
@misiugodfrey misiugodfrey requested a review from devavret July 3, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants