| 27 Apr 2024 |
connor (he/him) | https://github.com/NixOS/nixpkgs/blob/c8d7c8a78fb516c0842cc65346506a565c88014d/pkgs/development/cuda-modules/setup-hooks/setup-cuda-hook.sh | 19:50:54 |
connor (he/him) | That should be everything relevant | 19:51:02 |
kenshin79 | thanks! | 20:02:22 |
kenshin79 | hmm in the logs it does say Executing setupCUDAToolkitCompilers, so something is happening. So I added echo $NVCC_PREPEND_FLAGS in preBuild, and in the log I get --compiler-bindir=/nix/store/2111jw3vyy68fxm5hrnq59wkfgsl1y0d-gcc-wrapper-12.3.0/bin. Which would seem to mean that the patch is running, but it's setting the wrong compiler :/ | 20:50:56 |
kenshin79 | (connor by all means don't feel obliged to pitch in again. Mostly asking in case someone else can help :) ) | 20:51:55 |
kenshin79 | and yet. CUDA is 12.2, so as per nvcc-compatbilities.nix gcc 12 is the right version | 21:01:59 |
kenshin79 | ah but gcc is 13, so --compiler-bindin is discarded. Sorry for the stream of consciousness | 21:04:38 |
| 28 Apr 2024 |
SomeoneSerge (matrix works sometimes) | kenshin79 pass stdenv = cudaPackages.backendStdenv to buildPythonPackage when compiling with cudaSupport = true, that should remove gcc13 from the build closure entirely | 00:48:56 |
kenshin79 | thanks, I'll try. I did try stdenv = gcc11stdenv earlier but if I remember correctly that did nothing. stdenv only worked at the pythonPackages level. But I did try the horrible
xformers = super.xformers.overrideAttrs (oldAttrs: { propagatedNativeBuildInputs = [
pkgs.gcc12 ]; })
and it actually worked ^_^
It took hours to compile, so I'll try your method before bed.
Thanks!
| 07:25:20 |
| Remco Schrijver set a profile picture. | 09:10:11 |
SomeoneSerge (matrix works sometimes) | In reply to @kenshin79:matrix.org
thanks, I'll try. I did try stdenv = gcc11stdenv earlier but if I remember correctly that did nothing. stdenv only worked at the pythonPackages level. But I did try the horrible
xformers = super.xformers.overrideAttrs (oldAttrs: { propagatedNativeBuildInputs = [
pkgs.gcc12 ]; })
and it actually worked ^_^
It took hours to compile, so I'll try your method before bed.
Thanks!
You usually want overridePythonAttrs when dealing with ouyouts of buildPythonPackage. Also no reason to propagate gcc... | 10:04:41 |
| @vid:matrix.org joined the room. | 13:38:07 |
@vid:matrix.org | Hi all, I am running nixos 23.11. I have an intel 12700k igpu for display, and an nvidia 3090 I want to use for cuda. That is basically working, displays work as does nvidia-smi. However, I need to use this with docker, which apparently needs libnvidia-ml.so.1, which I cannot install. Is there an answer, or a better place to ask? thanks! | 13:38:13 |
srhb | What do you mean you cannot install it? | 13:40:25 |
@vid:matrix.org | I can't find how it should be installed. | 13:41:00 |
srhb | Isn't it part of the nvidia driver? eg linuxPackages.nvidia_x11_production or somesuch | 13:44:05 |
srhb | If that's enabled I would expect to find it in /run/opengl-driver somewhere | 13:45:37 |
srhb | regardless you might want to look for the nvidia docker options, particularly the new cdi stuff in nixos-unstable | 13:45:56 |
srhb | (I'm not on an nvidia machine right now) | 13:46:10 |
@vid:matrix.org | I've tried that but it didn't seem to work, I'm not sure how that relates to wanting to use intel for displays as well. is it "safe" to use nixos-unstable? | 13:48:09 |
srhb | I've actually never tried to just drive my intel screen with the nvidia driver enabled, but I would assume as long as your graphics stack still uses the intel driver, everything is fine.
And depends what you mean by safe. I run it on all my personal devices. I do not run it in production. | 13:49:11 |
@vid:matrix.org | I have a home media server that needs to be stable, I want to add some machine learning to it | 13:49:56 |
srhb | I mean, rollbacks are cheap in this world. | 13:50:09 |
srhb | But sure, it's not the core of your problem. | 13:50:16 |
@vid:matrix.org | my main concern is I'm travelling for a few months so don't want it being all crashy while I'm away | 13:50:28 |
@vid:matrix.org | * my main concern is I'm travelling for a few months so don't want it being all crashy while I'm away, but I want to use it remotely for ML things | 13:50:49 |
srhb | Sorry, I can't gauge stability for you. :) I run a custom hacked module on top of 23.11, I think the version in unstable is nicer, and personally I wouldn't be scared of it. YMMV. | 13:53:17 |
@vid:matrix.org | okily, I will check it out, ty | 13:54:45 |
srhb | But regardless, once you have that path (which I do think is from the driver, IIRC) you need to have that available in your container, and point $whatever-software at it. Often using LD_PRELOAD, if it's not something that knows about nix paths already (ie. /run/opengl-driver) | 13:55:36 |
@vid:matrix.org | ahh, in this case it's for llama.cpp under docker, but there will be other things | 13:58:56 |