!fXpAvneDgyJuYMZSwO:nixos.org

Nix Data Science

270 Members
57 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
2 Jan 2024
@1h0:matrix.org@1h0:matrix.org joined the room.11:33:37
3 Jan 2024
@benoitdr:matrix.orgbenoitdrStill a question : I have successfully packaged ctransformers based on the information above, but it cannot see my GPU. If I would pip install it, I would use the cuda option (pip install ctransfomers[cuda]). Is there a way to pass the same option to buildPythonPackage ?13:01:55
@benoitdr:matrix.orgbenoitdr
In reply to @benoitdr:matrix.org
Still a question : I have successfully packaged ctransformers based on the information above, but it cannot see my GPU. If I would pip install it, I would use the cuda option (pip install ctransfomers[cuda]). Is there a way to pass the same option to buildPythonPackage ?

(partially) answering to myslef, looking at setup.py, I can see that the cuda option corresponds to 2 extra packages :

        "cuda": [
            "nvidia-cuda-runtime-cu12",
            "nvidia-cublas-cu12",
        ],
14:18:44
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)(casual reminder that these are poetry2nix-generated wrappers for the pypi wheels, expect them to break)14:33:54
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)
In reply to @benoitdr:matrix.org
Still a question : I have successfully packaged ctransformers based on the information above, but it cannot see my GPU. If I would pip install it, I would use the cuda option (pip install ctransfomers[cuda]). Is there a way to pass the same option to buildPythonPackage ?
Pass the respective flags to cmake
14:34:10
@ss:someonex.netSomeoneSerge (Ever OOMed by Element) *

(casual reminder that these are poetry2nix-generated wrappers for the pypi wheels, expect them to break)

EDIT: aj this is from setup.py, nvm

14:34:33
@benoitdr:matrix.orgbenoitdrNeed more info ... indeed these 2 pkgs from setup.py are nvidia proprietary and only distributed as wheels on pypi. So what is the way out (if any) ? I have already tried to include python310Packages.pycuda, cudaPackages.libcublas, cudaPackages.cuda_cudart, cudaPackages.cudatoolkit , also passing allowUnfree = true; cudaSupport = true; to nixpkgs config, without success. I'm feeling a bit stuck here ...14:43:55
@ss:someonex.netSomeoneSerge (Ever OOMed by Element) You need to pass this flag during the ctransformers build: https://github.com/marella/ctransformers/blob/ed02cf4b9322435972ff3566fd4832806338ca3d/CMakeLists.txt#L6 14:45:55
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)

cudaPackages.cudatoolkit

You can remove this one

14:46:22
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)

python310Packages.pycuda

I don't see pycuda in ctrasnformers' dependencies?

14:47:01
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)
In reply to @ss:someonex.net
You need to pass this flag during the ctransformers build: https://github.com/marella/ctransformers/blob/ed02cf4b9322435972ff3566fd4832806338ca3d/CMakeLists.txt#L6
Their setup.py introduces an ad hoc environment variable for that: https://github.com/marella/ctransformers/blob/ed02cf4b9322435972ff3566fd4832806338ca3d/setup.py#L10C41-L10C42
14:50:11
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)It would've been better if they weren't wrapping/hiding cmake from the user but at least there's a variable14:50:37
@ss:someonex.netSomeoneSerge (Ever OOMed by Element) So you can set something like env.CT_CUBLAS = "ON" 14:51:22
@benoitdr:matrix.orgbenoitdrYep, env.CT_CUBLAS = "ON"; was the trick. Still I need cudatoolkit in propagatedBuildInputs, nothing more. Thanks a lot !15:58:26
4 Jan 2024
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)

Still I need cudatoolkit in propagatedBuildInputs

cudaPackages.cudatoolkit is being deprecated, you do not need it; cf. nixpkgs' torch or opencv4 derivations for examples

04:47:57
@ss:someonex.netSomeoneSerge (Ever OOMed by Element)Also there's no need to propagate it04:48:08
@thetootler:matrix.orgthetootler joined the room.06:25:27
@benoitdr:matrix.orgbenoitdrStrange ... It doesn't work without it on my side19:56:48

Show newer messages


Back to Room ListRoom Version: 6