fix: Linux NVIDIA tarball exceeds GitHub's 2 GiB asset limit - #222
Merged
Conversation
The Linux NVIDIA tarball baked the full CUDA torch wheel, producing an asset >2 GiB that GitHub release uploads reject (size must be < 2147483648). On Linux the default PyPI torch wheel bundles the CUDA runtime (~2.5 GB), unlike Windows where the default wheel is CPU-only. The Windows NVIDIA package therefore never baked CUDA -- it ships CPU torch and downloads the CUDA wheel at first run via the desktop shell (install_cuda_torch, which is cfg(not(macos)) and already covers Linux). Mirror that on Linux: bake the small CPU torch in both variants; the NVIDIA variant differs only by omitting the cpu-only marker, so the shell detects the GPU and downloads CUDA on first launch. Keeps both tarballs well under the 2 GiB limit.
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.
Problem
The
Linux Releasejob built both variants successfully but failed at upload:StemDeck-Linux-x64.NVIDIA.tar.gzexceeds GitHub's 2 GiB per-asset release limit.Cause — a wrong assumption in the original NVIDIA design
We baked the project's default torch into the NVIDIA variant, assuming it mirrored the Windows NVIDIA package. But:
So the Windows NVIDIA package never baked CUDA — it ships CPU torch and downloads the CUDA wheel at first run via the desktop shell's
install_cuda_torch(alreadycfg(not(macos)), so it covers Linux). Baking CUDA on Linux is fundamentally incompatible with GitHub releases.Fix
Bake the small CPU torch in both variants. The NVIDIA variant differs only by omitting the
cpu-onlymarker, so on first launch the shell detects the GPU and downloads the matching CUDA wheel — genuinely mirroring Windows. Both tarballs now stay well under 2 GiB.make-portable.sh: always force the CPU torch wheel; marker stays CPU-only-conditional.README-LINUX.txt: NVIDIA section now notes CUDA is downloaded on first run (needs internet + disk).Validated
The failed run proved the rest of the pipeline works end-to-end: version step (post-#221), CPU build, NVIDIA build, and ClamAV scan all passed on the
wsl2runner — only the oversized upload failed.🤖 Generated with Claude Code