diff --git a/use_existing_torch.py b/use_existing_torch.py index b5aafdde16c2..76480f3e58fe 100644 --- a/use_existing_torch.py +++ b/use_existing_torch.py @@ -1,5 +1,21 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project -print("vLLM is now using 'uv' to disable build isolation for 'torch'.") -print("Please instead install vLLM with 'uv pip install -e .' (must use 'uv')") +import glob + +requires_files = glob.glob('requirements/*.txt') +requires_files += ["pyproject.toml"] +for file in requires_files: + print(f">>> cleaning {file}") + with open(file) as f: + lines = f.readlines() + if "torch" in "".join(lines).lower(): + print("removed:") + with open(file, 'w') as f: + for line in lines: + if 'torch' not in line.lower(): + f.write(line) + else: + print(line.strip()) + print(f"<<< done cleaning {file}") + print() \ No newline at end of file