Skip to content

Commit ae818a1

Browse files
committed
python3Packages.vllm: unpin torch
1 parent c8d9d38 commit ae818a1

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

pkgs/development/python-modules/vllm/default.nix

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
autoAddDriverRunpath,
1010

1111
# build system
12+
cmake,
13+
jinja2,
14+
ninja,
1215
packaging,
1316
setuptools,
17+
setuptools-scm,
1418
wheel,
1519

1620
# dependencies
1721
which,
18-
ninja,
19-
cmake,
20-
setuptools-scm,
2122
torch,
2223
outlines,
2324
psutil,
@@ -246,10 +247,14 @@ buildPythonPackage rec {
246247
./0004-drop-lsmod.patch
247248
];
248249

249-
# Ignore the python version check because it hard-codes minor versions and
250-
# lags behind `ray`'s python interpreter support
251250
postPatch =
252251
''
252+
# pythonRelaxDeps does not cover build-system
253+
substituteInPlace pyproject.toml \
254+
--replace-fail "torch ==" "torch >="
255+
256+
# Ignore the python version check because it hard-codes minor versions and
257+
# lags behind `ray`'s python interpreter support
253258
substituteInPlace CMakeLists.txt \
254259
--replace-fail \
255260
'set(PYTHON_SUPPORTED_VERSIONS' \
@@ -263,9 +268,6 @@ buildPythonPackage rec {
263268

264269
nativeBuildInputs =
265270
[
266-
cmake
267-
ninja
268-
pythonRelaxDepsHook
269271
which
270272
]
271273
++ lib.optionals rocmSupport [
@@ -280,17 +282,17 @@ buildPythonPackage rec {
280282
];
281283

282284
build-system = [
285+
cmake
286+
jinja2
287+
ninja
283288
packaging
284289
setuptools
285-
wheel
290+
setuptools-scm
291+
torch
286292
];
287293

288294
buildInputs =
289-
[
290-
setuptools-scm
291-
torch
292-
]
293-
++ lib.optionals cpuSupport [
295+
lib.optionals cpuSupport [
294296
oneDNN
295297
]
296298
++ lib.optionals (cpuSupport && stdenv.isLinux) [

0 commit comments

Comments
 (0)