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
librealsense: refactor to allow use of cuda, and prepare for python integration #92997
Conversation
Cuda versions are currently subject to this bug: IntelRealSense/librealsense#6573 (comment) |
ce414c0
to
e9044f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an easy way to test these changes but it looks good to me!
@freezeboy thanks for the changes. Since I don't use cuda with librealsense would you be interested in becoming a maintainer for the librealsense package? |
Yeah, no problem on my side even if I don't use it a lot either I can help you |
cudaSupport = true; | ||
}; | ||
|
||
librealsenseWithoutCuda = callPackage ../development/libraries/librealsense { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the current convention is just to have no suffix
librealsenseWithoutCuda = callPackage ../development/libraries/librealsense { | |
librealsense = callPackage ../development/libraries/librealsense { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "default" version uses config to switch, whereas this one forces to always "not" use cuda
pythonPackages = self; | ||
}); | ||
|
||
pyrealsense2WithoutCuda = toPythonModule (pkgs.librealsenseWithoutCuda.override { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyrealsense2WithoutCuda = toPythonModule (pkgs.librealsenseWithoutCuda.override { | |
pyrealsense2 = toPythonModule (pkgs.librealsenseWithoutCuda.override { |
I made my own pyrealsense2 PR (mentioned above) without knowing this one existed. Unfortunately, Intel changed the way they install the Python bindings with 2.36.0. Now that nixpkgs has moved to that version, this PR no longer builds using I have a further patch to enable T265 support that will require consultation with the maintainers due to licensing issues. Not sure the best way to do that, but regardless I was going to wait until Python support was merged. |
I'll look at your method as I didn't check this update problem |
About the examples, I don't particularly care about building them as I don't need them, aren't they big ? should I add a flag to let the user remove them or it is not worth it ? |
c609ab0
to
beb565d
Compare
rs-color, rs-depth and rs-distance cannot find some symbols from stdcpp library, e.g. : Do you know how this package is named in nix ? |
Following up on our conversation on IRC:
|
|
I reviewed the latest commit with nixpkgs-review and the examples build and run fine. The Python module is built fine, but it doesn't appear to Python. I believe this is because After doing |
what do you mean it doesn't appear to python, it looks like it is ok on my side .. I usually use : |
We discussed on IRC and there was a misunderstanding on my end. I'm happy with this PR and think it should be merged. I'll close mine out. |
26a41a4
to
89c930e
Compare
89c930e
to
e6b76fc
Compare
…t and python bindings
e6b76fc
to
7841a59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff LGTM, but only did a quick glance:
https://github.com/NixOS/nixpkgs/pull/92997
8 packages built:
librealsense librealsenseWithCuda python27Packages.pyrealsense2 python27Packages.pyrealsense2WithCuda python37Packages.pyrealsense2 python37Packages.pyrealsense2WithCuda python38Packages.pyrealsense2 python38Packages.pyrealsense2WithCuda
ping me tomorrow if no one merges |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
well ping @jonringer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/NixOS/nixpkgs/pull/92997
8 packages built:
librealsense librealsenseWithCuda python27Packages.pyrealsense2 python27Packages.pyrealsense2WithCuda python37Packages.pyrealsense2 python37Packages.pyrealsense2WithCuda python38Packages.pyrealsense2 python38Packages.pyrealsense2WithCuda
Motivation for this change
librealsense can be compiled to use CUDA to improve some algorithms.
This patch adds two conditional parametes to add python support and cuda
support
also adds two variations (like tensorflow does):
and for python:
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)