| 22 Jun 2024 |
| Charlotte 🦝 (it/rac/racs/racself/🦝/plush) left the room. | 19:23:12 |
| 28 Jun 2024 |
benoitdr | Anyone interested to work with me on a derivation for llama-cpp-python ? I had a working solution a few months ago but it's not working anymore with the latest package version. | 12:09:12 |
benoitdr | Currently facing this problem :
"fatal error: nv/target: No such file or directory" | 12:53:42 |
| 29 Jun 2024 |
| maka_77x joined the room. | 00:48:44 |
| 30 Jun 2024 |
Bruno Rodrigues | has one of you packaged positron ? | 13:07:15 |
Bruno Rodrigues | * has one of you packaged positron ? https://github.com/posit-dev/positron/tree/main?tab=readme-ov-file#positron-- | 13:07:40 |
benoitdr | I'm making some progress, now I can build llama-cpp-python with cuda, but unfortunately at runtime, the python app doesn't see the GPU 😭 these lines from llama.cpp derivation caught my attention :
# It's necessary to consistently use backendStdenv when building with CUDA support,
# otherwise we get libstdc++ errors downstream.
# cuda imposes an upper bound on the gcc version, e.g. the latest gcc compatible with cudaPackages_11 is gcc11
effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else stdenv;
....
effectiveStdenv.mkDerivation (finalAttrs: {
....
in my case I'm not making a derivation but I'm building a python package using pkgs.python311.pkgs.buildPythonPackage could it be the reason why gpu/cuda is not used at runtime ?
| 20:15:11 |
SomeoneSerge (hash-versioned python modules when) |
not making a derivation b
buildPythonPackage is a wrapper around mkDerivation | 20:33:02 |
SomeoneSerge (hash-versioned python modules when) |
python app doesn't see the GPU
Usually that means you need to add a DT_RUNPATH or LD_LIBRARY_PATH somewhere, pointing at ${addDriverRunpath.driverLink}/lib | 20:33:36 |
| 1 Jul 2024 |
| Philippe Olivier joined the room. | 13:27:47 |
benoitdr | In reply to @ss:someonex.net
python app doesn't see the GPU
Usually that means you need to add a DT_RUNPATH or LD_LIBRARY_PATH somewhere, pointing at ${addDriverRunpath.driverLink}/lib Could you please help me on the syntax ? The closest I can get is below and has no effect (in my shellHook) : ´´´ export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [ pkgs.addDriverRunpath.driverLink ]} export DT_RUNPATH=${pkgs.lib.makeLibraryPath [ pkgs.addDriverRunpath.driverLink ]} ´´´ | 13:30:16 |
benoitdr | In reply to @ss:someonex.net
python app doesn't see the GPU
Usually that means you need to add a DT_RUNPATH or LD_LIBRARY_PATH somewhere, pointing at ${addDriverRunpath.driverLink}/lib * Could you please help me on the syntax ? The closest I can get is below and has no effect (in my shellHook) :
export LD\_LIBRARY\_PATH=${pkgs.lib.makeLibraryPath \[
pkgs.addDriverRunpath.driverLink
\]}
export DT\_RUNPATH=${pkgs.lib.makeLibraryPath \[
pkgs.addDriverRunpath.driverLink
\]}
| 13:30:45 |
benoitdr | * Could you please help me on the syntax ? The closest I can get is below and has no effect (in my shellHook) :
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [
pkgs.addDriverRunpath.driverLink
]}
export DT_RUNPATH=${pkgs.lib.makeLibraryPath [
pkgs.addDriverRunpath.driverLink
]}
| 13:31:36 |
SomeoneSerge (hash-versioned python modules when) | DT_RUNPATH is not an environment variable, but the first export seems like it should work | 13:36:18 |
benoitdr | well it doesn't .. | 13:37:16 |
SomeoneSerge (hash-versioned python modules when) | Well now it's a matter of finding out how exactly it doesn't work:) | 13:41:17 |
SomeoneSerge (hash-versioned python modules when) | Run the program with LD_DEBUG=libs, search for mentions of libcuda | 13:41:35 |
SomeoneSerge (hash-versioned python modules when) | ENsure that hardware.opengl.enable is set//run/opengl-driver/lib/libcuda.so exists | 13:41:49 |
| 2 Jul 2024 |
Bruno Rodrigues | I'm trying to package positron here is my attempt: https://github.com/b-rodrigues/nixpkgs/blob/positron/pkgs/by-name/po/positron/package.nix but I get this error message when trying to build
b-rodrigues@localhost:~/Documents/github_repos/nixpkgs(master)$ nix-shell -I nixpkgs=. -p R rPackages.dplyr positron
this derivation will be built:
/nix/store/qh59xjk5cz4dq44y0jixma219sr9xb0f-Positron-2024.06.1-27.drv
building '/nix/store/qh59xjk5cz4dq44y0jixma219sr9xb0f-Positron-2024.06.1-27.drv'...
Running phase: unpackPhase
tar: ./usr/share/positron/chrome-sandbox: Cannot change mode to rwsr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
error: builder for '/nix/store/qh59xjk5cz4dq44y0jixma219sr9xb0f-Positron-2024.06.1-27.drv' failed with exit code 2;
last 4 log lines:
> Running phase: unpackPhase
> tar: ./usr/share/positron/chrome-sandbox: Cannot change mode to rwsr-xr-x: Operation not permitted
> tar: Exiting with failure status due to previous errors
> dpkg-deb: error: tar subprocess returned error exit status 2
For full logs, run 'nix log /nix/store/qh59xjk5cz4dq44y0jixma219sr9xb0f-Positron-2024.06.1-27.drv'.
| 08:58:35 |
Bruno Rodrigues | it's probably something simple that I'm missing | 08:58:52 |
Bruno Rodrigues | I removed the unpackPhase now and simply use dpkg -x in the installPhase, but I get the same issue | 09:27:10 |
jbedo | Might be the suid bit | 10:03:10 |
jbedo | The store doesn’t allow suid so packaging won’t be straightforward | 10:11:28 |
jbedo | I might be a bit old fashioned but suid for a text editor seems ludicrous | 10:12:14 |
Bruno Rodrigues | it’s not possible to change the permissions during the unpackPhase for example? | 10:25:07 |
Bruno Rodrigues | maybe I can look into this: https://github.com/NixOS/nixpkgs/blob/88d829e52cfbeee71d81704ce28f5b439f6dea16/nixos/modules/security/chromium-suid-sandbox.nix#L14 | 10:28:13 |
Bruno Rodrigues | I've reached the limits of my knowledge. Likely it will have to be built from source then, but I'm too happy on spacemacs to spend the time trying to do that :D | 11:45:05 |
kupac | It's in experimental phase, so we don't have to rush with the packaging imo. We can file a bug report upstream about the suid and wait for it to run its course. | 13:40:38 |
kupac | * It's in experimental phase, so we don't have to rush with the packaging imo. You can file a bug report upstream about the suid and wait for it to run its course. | 13:40:54 |
| Janik (they/them) left the room. | 13:54:17 |