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

Experimental jetson support #10

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SomeoneSerge
Copy link

@SomeoneSerge SomeoneSerge commented Dec 19, 2023

PoC for #11 (accidentally, also #9, but I don't like my code)

$ nix build -f '<nixpkgs>' --arg 'config' '{ allowUnfree = true; cudaCapabilities = [ "7.2" ]; }' cudaPackages.cuda_compat -o cuda-compat
$ nix shell \
  github:SomeoneSerge/pkgs#pkgsXavier.some-pkgs-py.edm.pythonWith \
  github:SomeoneSerge/nix-gl-host/feat/jetson \
  --command nixglhost -d "$(readlink -f ./cuda_compat/compat)" -d /usr/lib/aarch64-linux-gnu/tegra \
  -- python -m edm.example

@SomeoneSerge
Copy link
Author

Actually, I think a better approach would be to just hide the system's libcuda from LD_LIBRARY_PATH. We already link cuda_compat directly in Nixpkgs, we only need to provide its impure dependencies

@picnoir
Copy link
Member

picnoir commented Jan 17, 2024

Hey! Sorry for the latency.

I don't have any nvidia hardware to test this against currently :( But I think the approach is sound.

On the long run, I envisioned to extract those DSO list from the Python script and move it to a JSON (or any other format) file that users could override on runtime. It doesn't have to happen here, but at least it's written down somewhere :)

As I said on another issue, I sadly don't use this project myself and can't maintain it on the long run. That being said, I know your nickname and I know I can trust you. Would you be interested in getting the commit bit and maintain this project? I'm up to help you during the transition phase.

@SomeoneSerge
Copy link
Author

On the long run, I envisioned to extract those DSO list from the Python script and move it to a JSON (or any other format) file that users could override on runtime. It doesn't have to happen here, but at least it's written down somewhere :)

One more direction to ponder is that libnvidia-container maintains a similar list

Would you be interested in getting the commit bit and maintain this project? I'm up to help you during the transition phase.

Thanks! Yes, absolutely. I have some time limitations too, but I'm interested in having this project maintained

@picnoir
Copy link
Member

picnoir commented Jan 17, 2024

One more direction to ponder is that libnvidia-container maintains a similar list

I did not consider that. Good idea.

Thanks! Yes, absolutely. I have some time limitations too, but I'm interested in having this project maintained

Seems like I'm not admin on this repo. @zimbatm, could you give the commit bit to @SomeoneSerge? (up until we decide to move this project to nix-community).

As I said in the other post, I can't test the Nvidia code, but feel free to ping me on Matrix/IRC if you need a rubberduck, chat about the problem space a bit. I have more context in mind than what I've written down in the docs :)

@zimbatm
Copy link
Member

zimbatm commented Jan 17, 2024

Welcome to the project @SomeoneSerge :)

@SomeoneSerge
Copy link
Author

Thanks @zimbatm! I'm planning to look over these changes again soon-ish and then have a more careful look at the repo. So far my thoughts are that we should do something about the glibc we link in Nixpkgs (LD_XXXXXXX_PATH=/usr/lib shouldn't be breaking things), but even then a tool capable of separating the flies from the meat generating a fine-grained LD_LIBRARY_PATH or exporting a /run/opengl-driver/lib in a FHS environment would be valuable

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.

3 participants