Add Flox development environment for CUDA builds#64
Conversation
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Provide a reproducible Linux toolchain (CUDA 12.2, gcc 12, uv, make) so contributors can compile without a system-wide CUDA toolkit install. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace Jimver/cuda-toolkit with a new setup-flox composite action that installs Flox, caches the Nix store and .flox/cache, and runs flox activate. Update setup-cuda-python-env, check, test_cpu, test_gpu, docs, and wheels workflows to use setup-flox. Subsequent steps run commands via flox activate -c since each GitHub Actions step runs in an isolated shell environment. Co-authored-by: charles <charlesbmi@users.noreply.github.com>
1df1e67 to
872740b
Compare
Introduction
Adds a Flox environment for compiling
machfrom source without installing the CUDA toolkit system-wide. Complements the existing Docker workflow with a lighter-weight, native Linux option.CUDA 12.2 is pinned to match common driver support (e.g. NVIDIA 535.x). Python dependencies remain in the project
.venvviauv sync— Flox supplies the build toolchain only.Changes
.flox/env/manifest.toml: Linux-only environment with:flox-cuda/cudaPackages_12_2—cuda_nvcc,cuda_cudart(incl. static libs),cudatoolkitgcc12— host compiler compatible with CUDA 12.2 nvccuv@0.9.28andgnumake— satisfymake compileprerequisitesCC,CXX,CUDA_HOME,LIBRARY_PATHvars for CMake/nvcc.flox/env/manifest.lock: Locked package resolution forx86_64-linuxandaarch64-linuxREADME.md: One-line Flox alternative under build prerequisitesBehavior
New capability: contributors with Flox installed can compile with:
Tested locally:
make check-system-depandmake compilesucceed insideflox activateon Linux Mint 22.3 (driver 535, GTX 1060).Note: prebuilt wheels target sm_75/89/90; older GPUs (e.g. GTX 1060, sm_61) can compile but cannot run the extension without adjusting
CMAKE_CUDA_ARCHITECTURES.Review checklist
Made with Cursor