Skip to content
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

tensorrt sdist install fails #3078

Closed
ddelange opened this issue Jun 22, 2023 · 3 comments
Closed

tensorrt sdist install fails #3078

ddelange opened this issue Jun 22, 2023 · 3 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@ddelange
Copy link
Contributor

ddelange commented Jun 22, 2023

Hi 👋

tensorrt sdist install runs pip install inside pip install, which is undefined/unsupported behaviour from the PyPA side (just like running multiple concurrent pip commands).

On my local machine (and probably on many other machines), it happens to work, but it is not robust and does not comply with the PyPA index url mechanic design.

The proper way to employ external index urls (see e.g. pytorch), is by having the user set the --extra-index-url flag on the top level installation command, or exporting PIP_EXTRA_INDEX_URL before running top level installation command.

Here is an example where this hack fails in the wild:

  • tensorrt install errors with /home/ci/opt/venv/bin/python3: No module named pip
    • command ['/home/ci/opt/venv/bin/python3', '-m', 'pip', 'install', 'tensorrt_libs==8.6.1', '--index-url', 'https://pypi.nvidia.com/']
  • yet autogluon ci runs python3 -m pip install --upgrade pip
    • which upgrades /home/ci/opt/venv/lib/python3.8/site-packages
  • the venv in question is set up and activated properly, as can be seen from the environment variables in the logs linked: VIRTUAL_ENV env var is set and VIRTUAL_ENV/bin is prepended to the PATH env var.

full error log for future reference: logs.txt

Originally posted by @ddelange in #2933 (comment)

@ddelange
Copy link
Contributor Author

Hi @zeroepoch 👋

I've opened #3080 to switch to the best practice implementation (similar to how torchvision 0.15.2 pins torch==2.0.1 and allows the end user to pick the cuda/cpu flavour using --extra-index-url).

How does that look to you?

@zerollzeng
Copy link
Collaborator

@pranavm-nvidia ^ ^

@ddelange
Copy link
Contributor Author

closed in #3080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants