Description
Recent build breakages in cudastack:standard (e.g., PR #1653) highlight a systemic fragility: the project's declarative, hardcoded versioning frequently outpaces NVIDIA's public distribution CDN. When a marketing announcement precedes the actual repository update, hardcoded wget or apt-get calls fail, aborting multi-hour container builds.
To maintain a "cutting-edge" profile while ensuring production-grade resilience, I propose a refactor of the package acquisition architecture.
Proposed Architectural Improvements
1. Implement Fallback Resolution Pattern
Refactor shell installers (e.g., install_cusparselt.sh, install_nvshmem.sh) to accept a prioritized list of versions. The installer should iterate through the list and download the first version that returns a 200 OK.
Example Logic:
# In config.py: 'CUSPARSELT_VERSIONS': '0.9.0,0.8.1'
IFS=',' read -ra VERSIONS <<< "$CUSPARSELT_VERSIONS"
for VER in "${VERSIONS[@]}"; do
if wget --spider --quiet "$URL_FOR_$VER"; then
wget -O "$ARCHIVE" "$URL_FOR_$VER"
DOWNLOAD_SUCCESS=1; break
fi
done
This allows maintainers to safely push "speculative" versions to the top of the list without breaking current builds for users.
2. Formalize Build Channels (stable vs edge)
Introduce explicit tags in config.py to isolate experimental versioning from verified releases.
cudastack:stable: Uses only empirically verified versions available in public APT/Redist channels.
cudastack:edge: Uses the newest announced versions (may 404 during the first 48-72 hours of a release).
3. Dynamic Network Index Parsing
Instead of hardcoding patch suffixes (e.g., mapping 0.8.0 -> .4 vs 0.8.1 -> .1), the build scripts should query the NVIDIA redistribution directory indexes via curl to dynamically resolve the highest available patch version for the requested major/minor.
4. Build on Centralized Repo Management (Ref: PR #1657)
Integrate these fallbacks into the proposed cuda-repo infrastructure. A centralized pre-flight check should validate repository connectivity and package availability before the main cudastack build begins.
Context
This proposal addresses the recurring "revert vs progress" friction seen in PR #1653, ensuring that the repository stays ahead of the curve without sacrificing the reliability expected by the Jetson developer community.
CC: @dusty-nv @johnnynunez @ptrecenti
Description
Recent build breakages in
cudastack:standard(e.g., PR #1653) highlight a systemic fragility: the project's declarative, hardcoded versioning frequently outpaces NVIDIA's public distribution CDN. When a marketing announcement precedes the actual repository update, hardcodedwgetorapt-getcalls fail, aborting multi-hour container builds.To maintain a "cutting-edge" profile while ensuring production-grade resilience, I propose a refactor of the package acquisition architecture.
Proposed Architectural Improvements
1. Implement Fallback Resolution Pattern
Refactor shell installers (e.g.,
install_cusparselt.sh,install_nvshmem.sh) to accept a prioritized list of versions. The installer should iterate through the list and download the first version that returns a200 OK.Example Logic:
This allows maintainers to safely push "speculative" versions to the top of the list without breaking current builds for users.
2. Formalize Build Channels (
stablevsedge)Introduce explicit tags in
config.pyto isolate experimental versioning from verified releases.cudastack:stable: Uses only empirically verified versions available in public APT/Redist channels.cudastack:edge: Uses the newest announced versions (may 404 during the first 48-72 hours of a release).3. Dynamic Network Index Parsing
Instead of hardcoding patch suffixes (e.g., mapping
0.8.0->.4vs0.8.1->.1), the build scripts should query the NVIDIA redistribution directory indexes viacurlto dynamically resolve the highest available patch version for the requested major/minor.4. Build on Centralized Repo Management (Ref: PR #1657)
Integrate these fallbacks into the proposed
cuda-repoinfrastructure. A centralized pre-flight check should validate repository connectivity and package availability before the maincudastackbuild begins.Context
This proposal addresses the recurring "revert vs progress" friction seen in PR #1653, ensuring that the repository stays ahead of the curve without sacrificing the reliability expected by the Jetson developer community.
CC: @dusty-nv @johnnynunez @ptrecenti