Remove --extra-index-url line from requirements.txt and conditionally install torch from the specified URL in setup.py.

This commit is contained in:
Paul Gauthier (aider) 2024-07-09 14:40:59 +01:00
parent 9fa70b4b05
commit 9a39f00c39
2 changed files with 7 additions and 2 deletions

View file

@ -4,8 +4,6 @@
#
# pip-compile requirements.in
#
--extra-index-url https://download.pytorch.org/whl/cpu
aiohttp==3.9.5
# via
# huggingface-hub

View file

@ -17,6 +17,13 @@ with open("README.md", "r", encoding="utf-8") as f:
packages = find_packages(exclude=["benchmark"]) + ["aider.website"]
print("Discovered packages:", packages)
import subprocess
# Install torch from the specific URL
subprocess.check_call([
"pip", "install", "torch==2.2.2", "--extra-index-url", "https://download.pytorch.org/whl/cpu"
])
setup(
name="aider-chat",
version=__version__,