Sync from v0.13
This commit is contained in:
18
use_existing_torch.py
Normal file
18
use_existing_torch.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import glob
|
||||
|
||||
for file in (*glob.glob("requirements/*.txt"), "pyproject.toml"):
|
||||
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}\n")
|
||||
Reference in New Issue
Block a user