nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python312Packages.vllm: 0.9.0.1 -> 0.9.1

+51 -29
+17 -4
pkgs/development/python-modules/vllm/0005-drop-intel-reqs.patch
··· 1 + From 7511784ceb9252091a9d63ac6b54dcc67dd2b262 Mon Sep 17 00:00:00 2001 2 + From: Conroy Cheers <conroy@corncheese.org> 3 + Date: Fri, 13 Jun 2025 17:42:10 +1000 4 + Subject: [PATCH] drop intel reqs 5 + 6 + --- 7 + requirements/cpu.txt | 3 --- 8 + 1 file changed, 3 deletions(-) 9 + 1 10 diff --git a/requirements/cpu.txt b/requirements/cpu.txt 2 - index 121330158..d41918883 100644 11 + index d7b0fc6d8..be2df751b 100644 3 12 --- a/requirements/cpu.txt 4 13 +++ b/requirements/cpu.txt 5 - @@ -20,7 +20,3 @@ datasets # for benchmark scripts 6 - 14 + @@ -24,8 +24,5 @@ datasets # for benchmark scripts 7 15 # cpu cannot use triton 3.3.0 8 16 triton==3.2.0; platform_machine == "x86_64" 9 - - 17 + 10 18 -# Intel Extension for PyTorch, only for x86_64 CPUs 11 19 -intel-openmp==2024.2.1; platform_machine == "x86_64" 12 20 -intel_extension_for_pytorch==2.7.0; platform_machine == "x86_64" 21 + py-libnuma; platform_system != "Darwin" 22 + psutil; platform_system != "Darwin" 23 + -- 24 + 2.49.0 25 +
+34 -25
pkgs/development/python-modules/vllm/default.nix
··· 3 3 stdenv, 4 4 python, 5 5 buildPythonPackage, 6 + pythonAtLeast, 6 7 fetchFromGitHub, 7 8 fetchpatch, 8 9 symlinkJoin, ··· 68 67 opentelemetry-exporter-otlp, 69 68 bitsandbytes, 70 69 flashinfer, 70 + py-libnuma, 71 71 72 72 # internal dependency - for overriding in overlays 73 73 vllm-flash-attn ? null, ··· 248 246 249 247 buildPythonPackage rec { 250 248 pname = "vllm"; 251 - version = "0.9.0.1"; 249 + version = "0.9.1"; 252 250 pyproject = true; 251 + 252 + # https://github.com/vllm-project/vllm/issues/12083 253 + disabled = pythonAtLeast "3.13"; 253 254 254 255 stdenv = torch.stdenv; 255 256 ··· 260 255 owner = "vllm-project"; 261 256 repo = "vllm"; 262 257 tag = "v${version}"; 263 - hash = "sha256-gNe/kdsDQno8Fd6mo29feWmbyC0c2+kljlVxY4v7R9U="; 258 + hash = "sha256-sp7rDpewTPXTVRBJHJMj+8pJDS6wAu0/OTJZwbPPqKc="; 264 259 }; 265 260 266 261 patches = [ ··· 269 264 url = "https://github.com/vllm-project/vllm/commit/6a5d7e45f52c3a13de43b8b4fa9033e3b342ebd2.patch"; 270 265 hash = "sha256-KYthqu+6XwsYYd80PtfrMMjuRV9+ionccr7EbjE4jJE="; 271 266 }) 267 + (fetchpatch { 268 + name = "fall-back-to-gloo-when-nccl-unavailable.patch"; 269 + url = "https://github.com/vllm-project/vllm/commit/aa131a94410683b0a02e74fed2ce95e6c2b6b030.patch"; 270 + hash = "sha256-jNlQZQ8xiW85JWyBjsPZ6FoRQsiG1J8bwzmQjnaWFBg="; 271 + }) 272 272 ./0002-setup.py-nix-support-respect-cmakeFlags.patch 273 273 ./0003-propagate-pythonpath.patch 274 274 ./0004-drop-lsmod.patch 275 275 ./0005-drop-intel-reqs.patch 276 276 ]; 277 277 278 - postPatch = 279 - '' 280 - # pythonRelaxDeps does not cover build-system 281 - substituteInPlace pyproject.toml \ 282 - --replace-fail "torch ==" "torch >=" 278 + postPatch = '' 279 + # pythonRelaxDeps does not cover build-system 280 + substituteInPlace pyproject.toml \ 281 + --replace-fail "torch ==" "torch >=" 283 282 284 - # Ignore the python version check because it hard-codes minor versions and 285 - # lags behind `ray`'s python interpreter support 286 - substituteInPlace CMakeLists.txt \ 287 - --replace-fail \ 288 - 'set(PYTHON_SUPPORTED_VERSIONS' \ 289 - 'set(PYTHON_SUPPORTED_VERSIONS "${lib.versions.majorMinor python.version}"' 283 + # Ignore the python version check because it hard-codes minor versions and 284 + # lags behind `ray`'s python interpreter support 285 + substituteInPlace CMakeLists.txt \ 286 + --replace-fail \ 287 + 'set(PYTHON_SUPPORTED_VERSIONS' \ 288 + 'set(PYTHON_SUPPORTED_VERSIONS "${lib.versions.majorMinor python.version}"' 290 289 291 - # Pass build environment PYTHONPATH to vLLM's Python configuration scripts 292 - substituteInPlace CMakeLists.txt \ 293 - --replace-fail '$PYTHONPATH' '$ENV{PYTHONPATH}' 294 - '' 295 - + lib.optionalString (nccl == null) '' 296 - # On platforms where NCCL is not supported (e.g. Jetson), substitute Gloo (provided by Torch) 297 - substituteInPlace vllm/distributed/parallel_state.py \ 298 - --replace-fail '"nccl"' '"gloo"' 299 - ''; 290 + # Pass build environment PYTHONPATH to vLLM's Python configuration scripts 291 + substituteInPlace CMakeLists.txt \ 292 + --replace-fail '$PYTHONPATH' '$ENV{PYTHONPATH}' 293 + ''; 300 294 301 295 nativeBuildInputs = 302 296 [ ··· 366 362 outlines 367 363 pandas 368 364 prometheus-fastapi-instrumentator 369 - psutil 370 365 py-cpuinfo 371 366 pyarrow 372 367 pydantic ··· 395 392 opentelemetry-api 396 393 opentelemetry-exporter-otlp 397 394 bitsandbytes 395 + # vLLM needs Torch's compiler to be present in order to use torch.compile 396 + torch.stdenv.cc 398 397 ] 399 398 ++ uvicorn.optional-dependencies.standard 400 399 ++ aioprometheus.optional-dependencies.starlette 400 + ++ lib.optionals stdenv.targetPlatform.isLinux [ 401 + py-libnuma 402 + psutil 403 + ] 401 404 ++ lib.optionals cudaSupport [ 402 405 cupy 403 406 pynvml ··· 413 404 dontUseCmakeConfigure = true; 414 405 cmakeFlags = 415 406 [ 407 + ] 408 + ++ lib.optionals cudaSupport [ 416 409 (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CUTLASS" "${lib.getDev cutlass}") 417 410 (lib.cmakeFeature "FLASH_MLA_SRC_DIR" "${lib.getDev flashmla}") 418 411 (lib.cmakeFeature "VLLM_FLASH_ATTN_SRC_DIR" "${lib.getDev vllm-flash-attn'}") 419 - ] 420 - ++ lib.optionals cudaSupport [ 421 412 (lib.cmakeFeature "TORCH_CUDA_ARCH_LIST" "${gpuTargetString}") 422 413 (lib.cmakeFeature "CUTLASS_NVCC_ARCHS_ENABLED" "${cudaPackages.flags.cmakeCudaArchitecturesString}") 423 414 (lib.cmakeFeature "CUDA_TOOLKIT_ROOT_DIR" "${symlinkJoin {