-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Make pip install
optional if using system Python
#1872
Comments
That's the way chaiNNer has always worked. chaiNNer literally can't function without its dependencies installed so I'm not sure why you would even want that. The way I see it is if you're using system python, you're opting-in to us installing things to your system python, because we need to. The alternative is just not letting users use system python at all, and forcing integrated python. |
Hmm, lemme see if I can figure out why this is behaving differently for me now. Something definitely changed in the last couple weeks; I assumed it was this. |
Is it trying to install things every time? Like even when they're already installed? Because it's supposed to only install things that are not installed |
|
Oh. I think I see what's going on. |
Hmmm... That was added as a way to let us check what GPU is installed so we can figure out what versions of certain dependencies to install (for pytorch and onnx specifically). I didn't realize it would cause issues on certain machines but i guess that's just the nature of python dependencies with natively compiled code. If you can find me a way to check what GPU someone has in a cross platform way, I'd consider getting rid of it. But since i currently have no alternative, we kinda need it |
I see. I'll look into it and get back to you once I've evaluated options a bit. |
One thing I could do is add a flag for certain dependencies to mark them as optional, and attempt installing them separately -- and if they fail, we can just ignore them from then on. Then we'd just treat your system as if it didn't have an nvidia gpu |
Yeah I think ignoring it if it fails to automatically install is reasonable. |
Also for the record, this package doesn't actually work for getting us cross-platform GPU info, it just gives us cross-platform Nvidia GPU info and returns an error when no Nvidia GPU is found, which worked well enough for what we needed. The old way we did this was either using nvidia-smi in a subprocess or manually looking for the nvidia-smi binary on the machine and using it in a subprocess. That package is just bindings for the same library that nvidia-smi uses, meaning we can get all the same info with it without needing to search for anything or use a subprocess, so it's a pretty clean way of doing it. But it can be ignored if it fails, since we can just treat it like you have an AMD GPU from then on out. |
Yeah unfortunately I just spent 10 minutes looking through GitHub hoping there was a Python package for enumerating either GPU's or PCIe devices, but it doesn't look like there's anything (other than a couple packages that just launch |
@JeremyRand did it say why it was failing to install? The wheel file for it is supposedly py3-none-any which means it should be installable on any platform or python version. It also doesn't look like it has any dependencies so I'm curious what closed-source dependencies you were talking about |
Hmm, so Debian's repos mark |
I have no idea what |
Hmm, I'll see if I can inspect the contents of the PyPI package and see how it differs from what Debian distributes. Will get back to you in a day or two. |
OK yes, you are right that there's no closed-source dependency. This is a bug in Debian's packaging; they are marking the Nvidia library as a dependency when it should be a recommendation or a suggestion instead. I will report that bug to Debian. Give me a day or so to make sure there are no remaining issues, and then I'll close this issue if there are no problems. |
Successfully got current chaiNNer to open after manually installing the needed deps with |
Motivation
It looks like #1834 results in the backend always running
pip install
when it decides that a dependency isn't present. This is problematic for users who want to manage dependencies themselves (e.g. installing packages viaapt
).Description
Would you take a PR that makes
pip install
optional in the backend if system Python is in use?Alternatives
Can't think of any alternatives; feel free to suggest any that occur to you.
The text was updated successfully, but these errors were encountered: