this post was submitted on 11 Aug 2024
24 points (96.2% liked)

Nix / NixOS

1743 readers
6 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] onlinepersona@programming.dev 4 points 3 months ago (1 children)

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 points 3 months ago

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.