Skip to content

Commit

Permalink
Introduce NVIDIA_TENSORRT_DISABLE_INTERNAL_PIP env var
Browse files Browse the repository at this point in the history
Signed-off-by: ddelange <14880945+ddelange@users.noreply.github.com>
  • Loading branch information
ddelange committed Jul 7, 2023
1 parent 9a8e0ce commit 2c382eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/packaging/frontend_sdist/setup.py
Expand Up @@ -29,6 +29,7 @@
"{}_bindings=={}".format(tensorrt_module, tensorrt_version),
]
nvidia_pip_index_url = os.environ.get("NVIDIA_PIP_INDEX_URL", "https://pypi.nvidia.com")
disable_internal_pip = os.environ.get("NVIDIA_TENSORRT_DISABLE_INTERNAL_PIP", False)


class InstallCommand(install):
Expand Down Expand Up @@ -79,7 +80,8 @@ def parent_command_line():

# use pip-inside-pip hack only if the nvidia index is not set in the environment
if (
nvidia_pip_index_url in pip_config_list()
disable_internal_pip
or nvidia_pip_index_url in pip_config_list()
or nvidia_pip_index_url in parent_command_line()
):
install_requires = tensorrt_submodules
Expand Down

0 comments on commit 2c382eb

Please sign in to comment.