-
-
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
Backend-defined Dependencies #1834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR: TODO is to clean up come comments and unused code. I also need to test what happens on a fresh start.
So this has an issue: Starting up the backend for the first time takes some time due to the deps being installed. I'm not really sure what to do about that, since we time out the backend if it doesn't respond within a certain time. gonna have to think about this a bit |
Mostly finished. I just need to review everything because I'm sure I left tons of commented-out code everywhere and probably just need to clean stuff up as well. But functionally its working.
This PR defines dependencies on the backend side. This means dependencies are linked directly to a package now.
The python process also installs all the core dependencies itself through pip commands in a subprocess. This allows someone to run the backend remotely and still have all the core deps be installed. The core deps just get auto-installed the way they did before.
run.py
now contains some imports that are required to be in that order. Basically, it imports the stuff that checks and installs the dependencies before doing anything else. It also force installs sanic, sanic-cors, and semver before doing any others.This also implements the nvml python package to check for an nvidia GPU on the backend side rather than on the frontend. this allows us to do the same GPU checks as before, only without needing to search for nvidia smi.
What this doesn't have is the ability to install optional dependencies through the backend. I'll do that in a separate PR.