Skip to content

Add Flox development environment for CUDA builds#64

Draft
charlesbmi wants to merge 4 commits into
mainfrom
feature/flox-cuda-env
Draft

Add Flox development environment for CUDA builds#64
charlesbmi wants to merge 4 commits into
mainfrom
feature/flox-cuda-env

Conversation

@charlesbmi

@charlesbmi charlesbmi commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Introduction

Adds a Flox environment for compiling mach from 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 .venv via uv sync — Flox supplies the build toolchain only.

Changes

  • .flox/env/manifest.toml: Linux-only environment with:

    • flox-cuda/cudaPackages_12_2cuda_nvcc, cuda_cudart (incl. static libs), cudatoolkit
    • gcc12 — host compiler compatible with CUDA 12.2 nvcc
    • uv@0.9.28 and gnumake — satisfy make compile prerequisites
    • CC, CXX, CUDA_HOME, LIBRARY_PATH vars for CMake/nvcc
  • .flox/env/manifest.lock: Locked package resolution for x86_64-linux and aarch64-linux

  • README.md: One-line Flox alternative under build prerequisites

Behavior

New capability: contributors with Flox installed can compile with:

flox activate
make compile

Tested locally: make check-system-dep and make compile succeed inside flox activate on 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

  • All existing tests and checks pass
  • Unit tests covering the new feature or bugfix have been added (N/A — dev environment)
  • The documentation has been updated if necessary (✓ README updated)

Made with Cursor

charlesbmi and others added 2 commits June 13, 2026 21:57
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>
@cursor cursor Bot force-pushed the feature/flox-cuda-env branch from 1df1e67 to 872740b Compare June 13, 2026 21:57
charlesbmi and others added 2 commits June 15, 2026 10:42
Pin UV_PYTHON to 3.11 in the check workflow so uv sync uses a managed
interpreter with dev headers instead of the runner's partial Python 3.10.

Co-authored-by: Cursor <cursoragent@cursor.com>
Set python-preference = "only-managed" so uv sync never picks partial
system interpreters on CI runners. Reverts the check workflow UV_PYTHON
pin in favor of this project-wide setting.

Co-authored-by: Cursor <cursoragent@cursor.com>
charlesbmi added a commit that referenced this pull request Jun 15, 2026
Drop cp310 and add cp314 manylinux wheels; align wheels workflow test
matrix and requires-python metadata with the new wheel targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
charlesbmi added a commit that referenced this pull request Jun 15, 2026
Drop Python 3.10 support: bump requires-python to >=3.11,<3.15, remove the
3.10 classifier, raise CMake minimum to 3.11, and regenerate uv.lock so
only-managed uv sync works with Python 3.14 on CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
charlesbmi added a commit that referenced this pull request Jun 15, 2026
Pin UV_PYTHON to 3.13 in check (cupy lacks cp314 wheels under
only-managed), upgrade cibuildwheel to v3.4 for cp314 builds, skip
free-threaded wheel variants, and fix wheel install glob for auditwheel
tags.

Co-authored-by: Cursor <cursoragent@cursor.com>
charlesbmi added a commit that referenced this pull request Jun 15, 2026
Raise test-cpu timeout after uv.lock regen invalidated caches and
slowed dependency downloads on cold runners.

Co-authored-by: Cursor <cursoragent@cursor.com>
@charlesbmi charlesbmi force-pushed the feature/flox-cuda-env branch from de762cd to 64b464f Compare June 15, 2026 20:03
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