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

Fix PyTriton library discovery #505

Merged
merged 3 commits into from
Feb 27, 2025
Merged

Fix PyTriton library discovery #505

merged 3 commits into from
Feb 27, 2025

Conversation

rishic3
Copy link
Collaborator

@rishic3 rishic3 commented Feb 26, 2025

Detect and configure required library paths (i.e., to Triton bundled libraries and libpython3.*.so), when starting Triton process. Avoids the need to set executorEnv globally and works across conda/non-conda envs (e.g. Dataproc vs. Databricks).
Minor cleanups to PyTriton server shutdown.

Copy link
Collaborator

@eordentlich eordentlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like an issue with the py triton package that you actually need this. The so library should be discoverable, just like the RAPIDs libraries and others.

# Add nvidia_pytriton.libs to LD_LIBRARY_PATH
for path in sys.path:
if os.path.isdir(path) and "site-packages" in path:
libs_path = os.path.join(path, "nvidia_pytriton.libs")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed and seems like a bug in the py triton python package

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For libpython3.*.so at least they do instruct to add to path in conda envs per docs. But yeah linking pytriton libs seems like it shouldn't be necessary; will ping on this.

@rishic3 rishic3 merged commit 5d52c1b into NVIDIA:main Feb 27, 2025
3 of 4 checks passed
@rishic3 rishic3 deleted the fix-lib-env branch February 27, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants