!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

317 Members
CUDA packages maintenance and support in nixpkgs | https://github.com/orgs/NixOS/projects/27/ | https://nixos.org/manual/nixpkgs/unstable/#cuda63 Servers

Load older messages


SenderMessageTime
27 Apr 2024
@connorbaker:matrix.orgconnor (he/him)https://github.com/NixOS/nixpkgs/blob/c8d7c8a78fb516c0842cc65346506a565c88014d/pkgs/development/cuda-modules/setup-hooks/setup-cuda-hook.sh19:50:54
@connorbaker:matrix.orgconnor (he/him)That should be everything relevant19:51:02
@kenshin79:matrix.orgkenshin79thanks!20:02:22
@kenshin79:matrix.orgkenshin79 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:matrix.orgkenshin79(connor by all means don't feel obliged to pitch in again. Mostly asking in case someone else can help :) )20:51:55
@kenshin79:matrix.orgkenshin79 and yet. CUDA is 12.2, so as per nvcc-compatbilities.nix gcc 12 is the right version 21:01:59
@kenshin79:matrix.orgkenshin79 ah but gcc is 13, so --compiler-bindin is discarded. Sorry for the stream of consciousness 21:04:38
28 Apr 2024
@ss:someonex.netSomeoneSerge (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:matrix.orgkenshin79

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
@remcoschrijver:tchncs.deRemco Schrijver set a profile picture.09:10:11
@ss:someonex.netSomeoneSerge (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@vid:matrix.org joined the room.13:38:07
@vid:matrix.org@vid:matrix.orgHi 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:matrix.orgsrhbWhat do you mean you cannot install it?13:40:25
@vid:matrix.org@vid:matrix.orgI can't find how it should be installed. 13:41:00
@srhb:matrix.orgsrhbIsn't it part of the nvidia driver? eg linuxPackages.nvidia_x11_production or somesuch13:44:05
@srhb:matrix.orgsrhbIf that's enabled I would expect to find it in /run/opengl-driver somewhere13:45:37
@srhb:matrix.orgsrhbregardless you might want to look for the nvidia docker options, particularly the new cdi stuff in nixos-unstable13:45:56
@srhb:matrix.orgsrhb(I'm not on an nvidia machine right now)13:46:10
@vid:matrix.org@vid:matrix.orgI'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:matrix.orgsrhbI'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@vid:matrix.orgI have a home media server that needs to be stable, I want to add some machine learning to it 13:49:56
@srhb:matrix.orgsrhbI mean, rollbacks are cheap in this world.13:50:09
@srhb:matrix.orgsrhbBut sure, it's not the core of your problem.13:50:16
@vid:matrix.org@vid:matrix.orgmy main concern is I'm travelling for a few months so don't want it being all crashy while I'm away13:50:28
@vid:matrix.org@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 things13:50:49
@srhb:matrix.orgsrhbSorry, 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@vid:matrix.orgokily, I will check it out, ty13:54:45
@srhb:matrix.orgsrhbBut 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@vid:matrix.orgahh, in this case it's for llama.cpp under docker, but there will be other things13:58:56

Show newer messages


Back to Room ListRoom Version: 9