Open link2xt opened 11 months ago
Yeah, this is unnecessary and annoying. A khoj dependency pulls in nvidia-cuda dependencies but only on linux machines for some reason. What can be done to fix that needs to be investigated
As I understand it, it is related to torch dependency, because if you use pip install torch
, you will get a version of torch for a system with CUDA
and to install torch without CUDA you should use pip3 install torch torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
.
I'm not very familiar with the hatch system, but perhaps something like this would work:
[tool.hatch.dependencies]
torch = { version = "*", index = "https://download.pytorch.org/whl/cpu" }
torchvision = "*"
torchaudio = "*"
EDIT:
and the installation logs from pip indicate that Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch>=2.0.1->khoj-assistant)
I do not even have an NVIDIA card, but various
nvidia-cuda
dependencies were installed. Would be nice to have these dependencies optional.