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

Can remote libraries be provided locally to mx? #284

Open
aragos opened this issue Jun 24, 2024 · 2 comments
Open

Can remote libraries be provided locally to mx? #284

aragos opened this issue Jun 24, 2024 · 2 comments

Comments

@aragos
Copy link

aragos commented Jun 24, 2024

I'm attempting to build Graal targets in a hermetic environment (no network access) to assure supply chain security. Because of this I need to find a way to provide libraries normally downloaded over the network (example) locally.

I've managed to track down where mx stores these kinds of dependencies once they're downloaded (~/.mx/cache) but fiddling with that location seems unwise. Is there a way to pass an alternate location for a given library, perhaps by flag, or a minimal patch to apply to the suite.pys so they can find the dependencies on the local file system instead?

@dougxc
Copy link
Member

dougxc commented Jun 24, 2024

It should be possible to replace the urls attribute of each library in suite.py with a path attribute which is the absolute path to the installed library. That said, it has been a long time since we've used explicit path attributes so I cannot guarantee that it works out of the box. If not, it should not be too hard to fix though.

@rschatz
Copy link
Member

rschatz commented Jun 25, 2024

Another way to do this is just pre-populate the mx cache. You can use the MX_CACHE env variable to point it at a different cache.

I don't know whether MX_URLREWRITE works with local (file:///) urls, but that might also be worth checking out.

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

No branches or pull requests

3 participants