Finally a half-decent CUDA solution on NixOS

https://lavafroth.is-a.dev/post/cuda-on-nixos-without-sacrificing-ones-sanity/

I had been struggling for a while to get CUDA on my main NixOS box for some ML programming. It seems there weren't any clear solutions in the NixOS forums, which just suggested suffering through painful build times. Here's my hacky, less Nix-y approach that takes ~5 minutes.

23 points · 4 comments · view on lemmy.world

4 Comments

chrash0@lemmy.world · 4 pts · 2y (1 reply)

this is so timely ha. i just installed NixOS on my 4090 machine and was about to install CUDA.

lavafroth@lemmy.dbzer0.com · 2 pts · 2y

Cheers!

onlinepersona@programming.dev · 4 pts · 2y (1 reply)

name = "nvidia-fuck-you";

Got a good chuckle out of me. As for buildFHSEnv how does it work? Does it use chroot and mount parts of /nix/store into it?

Anti Commercial-AI license

lavafroth@lemmy.dbzer0.com · 3 pts · 2y

Ha! yes. The buildFHSEnv function works by creating a separate namespace akin to Docker containers but without complete separation from the host system (I hint to this in my post). It then hosts the libraries in /nix/store into this namespace.