-
Notifications
You must be signed in to change notification settings - Fork 512
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
[Bug]: Trying to auto install packages during runtime is not security friendly #530
Comments
Thanks for the great useful project, looking forward to a resolution for this. |
I'm also running into problems where gptcache tries to install dependencies at runtime. I'd very much like to avoid this on production. It delays the startup of the application and risks the installation (and thus the application as a whole) failing. We're not using Redis, but it still tries to install the This is also quite confusing for users who are trying guidance using the python interpreter and running into this issue:
Note that the installation already happens when importing
There are a number of issues related to failure of installing the dependencies at runtime:
Preferably the optional dependencies would be specified as such. I have no experience doing the same with https://peps.python.org/pep-0508/#extras If I interpret that correctly it should be possible to specify:
So that people should be able to install Would that be a good alternative? |
i will checkout it, it's a bad case
|
Thirding this issue, it is a nasty surprise. We saw this behavior during the run of unit tests, which is absolutely the wrong place for a pip install, under any circumstances. The project should rely on setup.py to advertise its dependencies and let |
Current Behavior
GPTCache tries to check if the intended set of python modules exists in the host environment if not it tries to auto install them during runtime.
Expected Behavior
GPTCache should look for an alternative non-runtime based approach which is much security friendly or may be provide an option to toggle this off for downstream packages such as
guidance
and many others.In production environments, it is typical that the the environment is hardened like keeping the filesystem read-only etc. As GPTCache tries to install packages during runtime this might break the systems as they dont allow such operations.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: