-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Improve frontend Python packaging #3362
Comments
It's a long story, but there were multiple constraints that prevented us from implementing a more sane packaging solution. There are more details in the comments on this PR if you're interested. The issue you're seeing here should be fixed in the 9.0 wheels. Installing |
Thank you for the PR, it's nice to see that you also see it as a temporary hack. Could you elaborate a bit more on what you'd like to change for the 9.0 release? |
I wish I could say we have a proper solution but unfortunately we need to layer more hacks on what we have. The issue here can be fixed with something like: env = os.environ.copy()
env["PYTHONPATH"] = sys.exec_prefix
sp.run([sys.executable, "-m", "pip"] + args, env=env) in the frontend package's |
It's not just about Poetry, here's another big issue with pip: if you I'm failing to understand why do you need to keep pushing for this hackish mechanism. Is it so bad to let people specify the extra index url explicitly and just host |
@ralbertazzi The hackish mechanism is only for the cases where the nvidia package index is not specified. The idea was to prevent breaking existing workflows, though obviously that hasn't worked out so well. If you do specify the package index, then |
It does only work with pip though :) that hack will break for all other existing package managers (Poetry, Pipenv, PDM, Rye, Flit, ..) that are try to create reproducible environments based on PEP. |
True. There is an environment variable, |
closing since no activity for more than 3 weeks, pls reopen if you still have question, thanks! |
The Python packages of tensorrt are currently divided into three libraries:
tensorrt_bindings
, which contains the actual Python bindingstensorrt_libs
, which contains the tensorrt system libraries and depends on python cuda packagestensorrt
frontendWhile
tensorrt_bindings
andtensorrt_libs
are easily installable libraries, thetensorrt
packages seems to have a weird installation mechanism that relies on internally installing the other two libraries in itssetup.py
. This makes it hard to use the frontend with package managers such as Poetry which rely on PEP 517 builds.Couldn't
tensorrt
simply requiretensorrt_bindings
andtensorrt_libs
, just as for exampletensorrt_bindings
requires some cuda dependencies? This would make the installation mechanism much simpler, compliant to existing PEPs, and reproducible (as all packages would be nicely tracked in thepoetry.lock
file). Right now I'm resorting to installingtensorrt_bindings
andtensorrt_libs
as I didn't seem to find other ways.Here you can find the error I'm getting through Poetry:
The text was updated successfully, but these errors were encountered: