Skip to content

Unnecessary dependencies are installed by pip install khoj-assistant #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
link2xt opened this issue Jul 30, 2023 · 2 comments
Open
Labels
maintain Maintain code, documentation or project

Comments

@link2xt
Copy link

link2xt commented Jul 30, 2023

I do not even have an NVIDIA card, but various nvidia-cuda dependencies were installed. Would be nice to have these dependencies optional.

@debanjum
Copy link
Member

debanjum commented Aug 1, 2023

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

@debanjum debanjum added the maintain Maintain code, documentation or project label Aug 1, 2023
@lumpsoid
Copy link

lumpsoid commented Oct 31, 2023

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
image

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintain Maintain code, documentation or project
Projects
None yet
Development

No branches or pull requests

3 participants