Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nix and AI: Are we there yet?

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Nix and AI: Are we there yet?

AI stacks look like the perfect use-case for Nix: Massively multiplying dependency matrices, double-digit-GB OCI images, tedious, Sisyphean build → push → pull → test loops. In ML/AI dev, "It runs" literally means "It runs … on this machine." So … why aren't more ML teams using Nix? This talk is a field guide to the logistics and sociotechnics of what it takes to make Nix happen in AI. Its point of departure is the following question: "Why do we ship what we ship the way we ship it? Either Nix fits the conveyor belt people already ship on, or ML teams learn a new way to build → ship → deploy software. So what will it take to fit Nix to this conveyor belt?

Avatar for Michael Stahnke

Michael Stahnke

March 06, 2026
Tweet

More Decks by Michael Stahnke

Other Decks in Technology

Transcript

  1. PLANETNIX 2026 Nix and AI Are We There Yet? The

    Agony and the Empathy Flox Nix AI @stahnma 1 / 55
  2. OPENING AI has every problem Nix was built for Lack

    of reproducability. @stahnma 1 / 55
  3. OPENING AI has every problem Nix was built for Huge

    artifacts and complex setup. @stahnma 1 / 55
  4. A DAY IN THE LIFE From the ML engineer’s chair

    One tutorial says Conda. @stahnma 1 / 55
  5. A DAY IN THE LIFE From the ML engineer’s chair

    Another says pip. @stahnma 1 / 55
  6. A DAY IN THE LIFE From the ML engineer’s chair

    Another says build from source. @stahnma 1 / 55
  7. A DAY IN THE LIFE · CONTINUED Conflicting setup is

    normal Linux and Windows flags diverge. @stahnma 1 / 55
  8. A DAY IN THE LIFE · CONTINUED Conflicting setup is

    normal Teammates have different setups. @stahnma 1 / 55
  9. A DAY IN THE LIFE · CONTINUED Conflicting setup is

    normal Both “work,” until handoff time. @stahnma 1 / 55
  10. A DAY IN THE LIFE Not a skill issue These

    are brilliant people. @stahnma 1 / 55
  11. A DAY IN THE LIFE Not a skill issue Their

    domain is models, not plumbing. @stahnma 1 / 55
  12. A DAY IN THE LIFE Not a skill issue Tooling

    sprawl is a response to incentives. @stahnma 1 / 55
  13. A DAY IN THE LIFE · CONTINUED I got it

    working. I’m not touching it. This is rational behavior when your KPI is model quality, not environment architecture. @stahnma 1 / 55
  14. THE HANDOFF Every SDLC boundary creates rework Two scientists can

    mean two productionization projects. @stahnma 1 / 55
  15. THE HANDOFF This is where Nix should shine Lock it.

    Reproduce it. Remove reverse-engineering from the release path. @stahnma 1 / 55
  16. JUST USE NIX Barrier set #1 Which command do I

    want: `nix develop` or `nix shell`? @stahnma 1 / 55
  17. “JUST USE NIX” Barrier set #3 Then pip-in-Nix warnings and

    “broken guarantees” debates. @stahnma 1 / 55
  18. JUST USE NIX This is a UX problem The barrier

    is not intelligence. The barrier is onboarding and workflow ergonomics. @stahnma 1 / 55
  19. GOOD NEWS CUDA GPU setup used to be a major

    pain point. @stahnma 1 / 55
  20. CPU TWIST Production inference is often CPU They frequently scale

    inference on CPUs for cost. @stahnma 1 / 55
  21. CPU TWIST Production inference is often CPU Environment strategy must

    cleanly cover both targets. @stahnma 1 / 55
  22. WHAT WILL IT TAKE? The seam: where Nix ends and

    Python begins Not “nixify everything.” Not “just Docker.” Use the right layer boundary. @stahnma 1 / 55
  23. LAYER OWNERSHIP Nix/Flox owns system and native deps CUDA libraries,

    PyTorch binaries, C extensions. @stahnma 1 / 55
  24. LAYER OWNERSHIP Nix/Flox owns system and native deps This is

    where reproducibility pain is highest. @stahnma 1 / 55
  25. LAYER OWNERSHIP · CONTINUED UV owns pure Python app dependencies

    Strong lockfiles and traceability for app-level Python. @stahnma 1 / 55
  26. LAYER OWNERSHIP · CONTINUED UV owns pure Python app dependencies

    Together with Nix: provenance plus practical workflow. @stahnma 1 / 55
  27. WHY THIS MATTERS Artifact size is not academic Generic PyTorch

    wheel: ~800 MB. Nix-built target-specific package: ~55 MB. @stahnma 1 / 55
  28. PRIORITY 2 Better Python-to-Nix bridges uv2nix and dream2nix are promising.

    (but have been in that state for a while) @stahnma 1 / 55
  29. AI CASE STUDY AI may unlock Nix adoption for AI

    teams 2.5 years ago: 31 iterations for a working Nix package. Yesterday: one prompt, clean package. @stahnma 1 / 55
  30. SUMMARY Top 3 improvement recommendations Keep AI/ML/Python packages continuously fresh.

    Improve Python-to-Nix bridge reliability (uv2nix/dream2nix). Focus on onboarding as a workflow. Meet your users where they are. @stahnma 1 / 55
  31. CLOSE Are we there yet? But the shape of the

    answer is clear. @stahnma 1 / 55
  32. CLOSE Are we there yet? The distance is closing from

    both directions. Thank you Q&A @stahnma 1 / 55