From ae818a13d55fed703969612087a9e84f4da3e1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 29 May 2025 19:50:04 -0700 Subject: [PATCH] python3Packages.vllm: unpin torch --- .../python-modules/vllm/default.nix | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/vllm/default.nix b/pkgs/development/python-modules/vllm/default.nix index 67f1b7cacdac..7cbfb50fce01 100644 --- a/pkgs/development/python-modules/vllm/default.nix +++ b/pkgs/development/python-modules/vllm/default.nix @@ -9,15 +9,16 @@ autoAddDriverRunpath, # build system + cmake, + jinja2, + ninja, packaging, setuptools, + setuptools-scm, wheel, # dependencies which, - ninja, - cmake, - setuptools-scm, torch, outlines, psutil, @@ -246,10 +247,14 @@ buildPythonPackage rec { ./0004-drop-lsmod.patch ]; - # Ignore the python version check because it hard-codes minor versions and - # lags behind `ray`'s python interpreter support postPatch = '' + # pythonRelaxDeps does not cover build-system + substituteInPlace pyproject.toml \ + --replace-fail "torch ==" "torch >=" + + # Ignore the python version check because it hard-codes minor versions and + # lags behind `ray`'s python interpreter support substituteInPlace CMakeLists.txt \ --replace-fail \ 'set(PYTHON_SUPPORTED_VERSIONS' \ @@ -263,9 +268,6 @@ buildPythonPackage rec { nativeBuildInputs = [ - cmake - ninja - pythonRelaxDepsHook which ] ++ lib.optionals rocmSupport [ @@ -280,17 +282,17 @@ buildPythonPackage rec { ]; build-system = [ + cmake + jinja2 + ninja packaging setuptools - wheel + setuptools-scm + torch ]; buildInputs = - [ - setuptools-scm - torch - ] - ++ lib.optionals cpuSupport [ + lib.optionals cpuSupport [ oneDNN ] ++ lib.optionals (cpuSupport && stdenv.isLinux) [