!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

332 Members
https://github.com/nix-community/poetry2nix68 Servers

Load older messages


SenderMessageTime
29 Feb 2024
@matusf:matrix.orgmatusf joined the room.11:52:11
5 Mar 2024
@meditans:matrix.orgmeditans joined the room.03:45:01
@meditans:matrix.orgmeditans changed their display name from Carlo Nucera to meditans.03:45:20
@meditans:matrix.orgmeditans Hey, I'm trying to build the vllm package (an LLM inference server) with poetry2nix. I corrected the build-system related errors I could, but now I can't build safetensors 0.4.2 and I can't use an earlier version. The failure is due to maturin: I tried what I could in the issue tracker, and tried setting preferWheel to true, but I still can't getting this built. Before I open an issue, is there something I should try? I created a repo for reproducibility here: https://github.com/meditans/packaging-vllm 03:55:44
@meditans:matrix.orgmeditans

if you run the default shell in that flake, you will see the maturin error I'm talking about:

error: builder for '/nix/store/6bmn75r0iwlwwidng0am3s6qdgmh0jqk-python3.11-safetensors-0.4.2.drv' failed with exit code 2;
       last 10 log lines:
       >           ^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/sxr2igfkwhxbagri49b8krmcqz168sim-python3-3.11.8/lib/python3.11/importlib/__init__.py", line 126, in import_module
       >     return _bootstrap._gcd_import(name[level:], package, level)
       >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
       >   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
       >   File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
       > ModuleNotFoundError: No module named 'maturin'
       > 
       > 
       For full logs, run 'nix log /nix/store/6bmn75r0iwlwwidng0am3s6qdgmh0jqk-python3.11-safetensors-0.4.2.drv'.
error: 1 dependencies of derivation '/nix/store/z3yjz5pcr2j0fghlk78vngxl3bc16sda-python3-3.11.8-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j2hn0kja87dqkw8043l7m56wjh0ny9yz-nix-shell-env.drv' failed to build
03:58:03
@meditans:matrix.orgmeditans * Hey, I'm trying to build the vllm package (an LLM inference server) with poetry2nix. I corrected the build-system related errors I could, but now I can't build safetensors 0.4.2 and I can't use an earlier version. The failure is due to maturin: I tried what I could in the issue tracker, and tried setting preferWheel to true, but I still can't get this built. Before I open an issue, is there something I should try? I created a repo for reproducibility here: https://github.com/meditans/packaging-vllm 03:59:20
@meditans:matrix.orgmeditans * Hey, I'm trying to build the vllm package (an LLM inference server) with poetry2nix. I corrected the build-system related errors I could, but now I can't build safetensors 0.4.2 and I can't use an earlier version. The failure is due to maturin: I tried the solutions I found in the issue tracker, and tried setting preferWheel to true, but I still can't get this built. Before I open an issue, is there something I should try? I created a repo for reproducibility here: https://github.com/meditans/packaging-vllm 03:59:43
@gaivs:matrix.orggaivsHave you tried adding matirin to your overrides? 09:47:17
@gaivs:matrix.orggaivs*maturin09:47:27
@meditans:matrix.orgmeditansYes, both as the maturin package in pkgs, and the python module maturin. That didn't change things (maybe I did something incorrectly though). I also tried adding the maturin hook, and still no progress.11:33:35
@gaivs:matrix.orggaivsStrange, I didn't really understand the overrides.nix file you have, but whenever I've had a similar error I've just followed the edgecases documentation in the poetry2nix repo, and it has worked11:50:51
@meditans:matrix.orgmeditansThanks for looking at the problem! Did your patches work even for the rust/python toolchain, like maturin? Can you share an example? I agree that for normal buildtools like setuptools it works alright.11:53:18
@gaivs:matrix.orggaivs Can't recall if I've come across any specific maturin problems yet. You should open a github issue, they state in the edgecases document that they need examples for maturin use, as it is pretty new 12:16:11
@meditans:matrix.orgmeditans

I solved the problem about maturin (and am writing this response in case someone has my problem). In the edgecases.md document it was advised to use preferWheel and preferWheels, but I wasn't aware of this:

https://github.com/nix-community/poetry2nix/issues/1115#issuecomment-1611913900
One should prefer:

overrides = poetry2nix.overrides.withDefaults (<...>);

to:

overrides = poetry2nix.defaultPoetryOverrides.extend (<...>);

otherwise, preferWheel = true is not respected.

18:11:46
@meditans:matrix.orgmeditans

Now I have still a problem, and I'm wandering if someone encountered it before:

RuntimeError: Cannot find CUDA_HOME. CUDA must be available to build the package.

This happens when I try to build the wheel for the last package I need, llvm itself. As usual, one can try the failing build at the latest commit of the repo I linked in the first question. I wonder who should set CUDA_HOME, and how could I set it so that the build process of vllm sees it (I don't think a shellHook is early enough)

18:18:55
@meditans:matrix.orgmeditans *

Now I have still a problem, and I'm wondering if someone encountered it before:

RuntimeError: Cannot find CUDA_HOME. CUDA must be available to build the package.

This happens when I try to build the wheel for the last package I need, llvm itself. As usual, one can try the failing build at the latest commit of the repo I linked in the first question. I wonder who should set CUDA_HOME, and how could I set it so that the build process of vllm sees it (I don't think a shellHook is early enough)

18:19:04
@meditans:matrix.orgmeditans *

Now I have still a problem, and I'm wondering if someone encountered it before:

RuntimeError: Cannot find CUDA_HOME. CUDA must be available to build the package.

This happens when I try to build the wheel for the last package I need, vllm itself. As usual, one can try the failing build at the latest commit of the repo I linked in the first question. I wonder who should set CUDA_HOME, and how could I set it so that the build process of vllm sees it (I don't think a shellHook is early enough)

18:19:19
@meditans:matrix.orgmeditans *

Now I have still a problem, and I'm wondering if someone encountered it before:

RuntimeError: Cannot find CUDA_HOME. CUDA must be available to build the package.

This happens when I try to build the wheel for the last package I need, vllm itself. As usual, one can try the failing build at the latest commit of the repo I linked in the first question. I wonder who should set CUDA_HOME, and how could I set it so that the build process of vllm sees it (I don't think a shellHook is early enough)

18:19:38
@meditans:matrix.orgmeditans

I solved this problem via:

  addCudaHome = { name, final, prev, pkg }@args:
    pkg.overridePythonAttrs (old: {
      preBuild = (old.preBuild or "")
        + ''export CUDA_HOME="${final.pkgs.cudatoolkit}"'';
    });

19:18:28
@meditans:matrix.orgmeditans But now the build expects to find the executable which and it ignores it even if I put it in the build deps 19:19:03
@meditans:matrix.orgmeditans duh, buildInputs vs nativeBuildInputs. I didn't realize before that native means build time 😂 20:28:13
@meditans:matrix.orgmeditans * duh, buildInputs vs nativeBuildInputs. I didn't realize before that native means build time 😂. So, the which thing is solved too. 20:28:34
6 Mar 2024
@vengmark2:matrix.orgl0b0 How do I create a mkPoetryEnv which includes a poetry executable with the Python version passed to mkPoetryEnv? 02:23:46
@reivilibre:librepush.netreivilibre left the room.08:11:33
@meditans:matrix.orgmeditans Usually for me is enough installing poetry-core that I can find in any python's package collection. Eg python311Packages.poetry-core. Does this help? 12:31:21
@meditans:matrix.orgmeditansI created a github issue for my remaining problems in packaging vllm https://github.com/nix-community/poetry2nix/issues/1553 If you have packaged deep-learning dependencies and you have suggestions I'm very happy to hear them15:56:34
@vengmark2:matrix.orgl0b0 poetry-core doesn't seem to include the poetry CLI. 21:27:21
7 Mar 2024
@taitusi_muavesi:matrix.orgsunil joined the room.10:35:54
@taitusi_muavesi:matrix.orgsunilHi, I thought I could "just" use poetry2nix to create a nix package for a poetry application I want to use. The problem is that I'm quite new to nix and I quite quickly ended up in the "edgecases.md" section of missing setuptools for a bunch of dependencies. My overrides are now ~ 200 loc and the suggested shorter solution won't work because I have to overwrite the hash of another dependency. Is there a quick way to propergate setuptools and setuptools-scm to all dependecies as PythonAttrs? 10:41:58
@taitusi_muavesi:matrix.orgsunilThe python lib in question is: https://github.com/earthobservations/wetterdienst 10:43:32

Show newer messages


Back to Room ListRoom Version: 6