cvxgrp / pymde

Minimum-distortion embedding with PyTorch
https://pymde.org
Apache License 2.0
526 stars 27 forks source link

poetry installation "Unable to find installation candidates for nvidia-cudnn-cu11" #73

Open ErrorUnknown88 opened 1 year ago

ErrorUnknown88 commented 1 year ago

When installing the package using peotry on a device that does not have cuda installed I get the error:

Unable to find installation candidates for nvidia-cudnn-cu11

since the package works on CPU as well is it possible to fix this install issue so that i don't have to have a gpu enabled device to install the package.

eric79 commented 1 year ago

+1

akshayka commented 1 year ago

Thanks for reporting. I am not very familiar with poetry, but it looks like this is due to the dependency on torch, which we can't remove.

Here is a relevant thread:

https://github.com/python-poetry/poetry/issues/6939

Scanning that thread, it appears that a fix for torch has been merged, but perhaps it has not yet made it to pypi.

eric79 commented 1 year ago

I believe the torch 1.13.1 version that should have the fix has indeed been posted to PyPI: https://pypi.org/project/torch/

eric79 commented 1 year ago

I will admit that I'm pretty ignorant when it comes to building distributions for multiple platforms ... it looks like your pyproject.toml doesn't reference the torch dependency, but rather I found this like in your requirements.txt:

torch --find-links https://download.pytorch.org/whl/torch_stable.html

Following that url, there does seem to be torch 1.13.1 versions up there. Do you need to do something special to coax pymde to use the latest torch?

akshayka commented 1 year ago

The requirements.txt is only used in my continuous integration, so I don't think it will make a difference in the poetry installation. PyMDE imposes no max versions on torch/torchvision, so you shouldn't need to do anything special to use their latest versions.

eric79 commented 1 year ago

Ha! I didn't realize that the latest version of torch had just been posted to PyPI yesterday. I ran the poetry install today, and that seems to have fixed everything. Woohoo!

@ErrorUnknown88 , do you want to try again and see if it is indeed fixed for you, too?