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

site-packages symlink forest in venv #275

Merged
merged 5 commits into from
Mar 30, 2024

Conversation

siddharthab
Copy link
Contributor

@siddharthab siddharthab commented Feb 27, 2024

This emulates the behavior where a single site-packages directory
contains all/most PyPi packages. Packages distributed by NVIDIA
currently assume this through the use of rpath as $ORIGIN/../../
to reach the nvidia package location. Downstream libraries like torch
and jax do not set up the dynamic library search path based on sys.path
either.

This is a casual attempt, but can be refined by others.

Fixes #274.

@CLAassistant
Copy link

CLAassistant commented Feb 27, 2024

CLA assistant check
All committers have signed the CLA.

@siddharthab siddharthab changed the title Symlink forest in venv site-packages symlink forest in venv Feb 27, 2024
This emulates the behavior where a single site-packages directory
contains all/most PyPi packages. Packages distributed by NVIDIA
currently assume this through the use of rpath as `$ORIGIN/../../`
to reach the `nvidia` package location. Downstream libraries like torch
and jax do not set up the dynamic library search path based on sys.path
either.

This is a casual attempt, but can be refined by others.

TODO:
[] Build binaries for all architectures.

Fixes #274.
@alexeagle
Copy link
Member

Note, at HEAD we no longer have checked-in binaries so you can remove that when you rebase. I'm very +1 to having compatibility with ~all existing packages and satisfying the assumptions they make. I can't read Rust yet so handing to Matt.

@mattem
Copy link
Member

mattem commented Mar 7, 2024

Thanks for this! Will try to take a look soon.

py/tools/py/src/pth.rs Show resolved Hide resolved
py/tools/py/src/pth.rs Outdated Show resolved Hide resolved
py/tools/py/src/pth.rs Outdated Show resolved Hide resolved
@mattem mattem merged commit 49bd17b into aspect-build:main Mar 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Some packages rely on site-packages layout
4 participants