-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Headless version??? #293
Comments
I think that is a reasonable request. I do not want to call it "headless" like the pypi version does. But I think it should be dooable. I had a sketch of a PR a while back: I think we would want to "weigh down" the |
Are there dependencies other than qt that would need to be removed for the headless version you have in mind? |
At the moment only qt come to mind |
@hmaarrfk However, if there could be other dependencies in addition to qt, maybe "noqt" is not a very future-proof name, as it looks related only to qt |
(I thought I sent this message earlier so sorry if I double sent this) I am with supportive of wanting to make this second version. However I'm not sure on how best to maintain it. To my knowledge, I don't think we can simply delete the dependency, or opencv would fail to import in python. This might mean that we would have to build the package twice (which I'm kinda OK with). However, what I don't know how to answer is how do we name the package so that it stays consistent with the rest of the ecosystem. I would try to find a similar issue in: https://github.com/conda-forge/conda-forge.github.io and cross reference here. There must be others that want slightly fewer features than the "feature full" packages that we provide by default. Typically this involves creating a Demonstration PRs would be welcome by me if you have an idea on how to do it. |
OpenCV have ability to decouple some of dependencies using plugin mechanism. Currently GTK (highgui), OpenMP (core), TBB (core), MSMF (videoio), FFmpeg (videoio), GStreamer (videoio) and MediaSDK (videoio) are supported. Corresponding options can be found in the reference guide, e.g. https://docs.opencv.org/4.5.4/db/d05/tutorial_config_reference.html#tutorial_config_reference_highgui These plugins can be built in the main build process or in separate builds. Howether I don't know how to tie this with Conda packaging, because I'm not fluent with it. Is there any package flavor mechanism or should it be implemented as _additional packages or meta-packages? And how would existing users transition to this new scheme? What should we do with Qt dependency? |
As a side note, there's a "opencv-python-headless" package within:
|
@mshabunin can we remove the so files and keep OpenCv working? if so, that should be readily doable with Conda. i can help with that if you can help me identify the so file that is dependent on Qt |
@hmaarrfk , you mean libraries? I'm afraid not. But we can split these libraries into smaller plugins which depend on other libraries. For example:
Main problem here is that OpenCV does not support extracting Qt dependency to a plugin yet, it should be implemented first. Second problem is making packages and keeping compatibility with existing package names. Currently there are 3 packages opencv, py-opencv, libopencv: |
Thank you for the explanation and the graphs. Very helpful. Here are my thoughts:
Personally, I think we would want to create a |
(@mshabunin as I understand you are involved with OpenCV upstream but my point is that it seems that it is a project htat is more than just a "conda-forge quick fix") |
@candalfigomoro seeing as opencv was flagged as posing "systemic" risk, I am apprehensive at doing big changes here: I would suggest maintaining your own fork and simply building what you need. It should be pretty maintainable in the short term.... You can use a higher build number to prioritize it on your channel. |
At the moment, I think I can try to just copy fastai's or intel's recipe for opencv-python-headless |
That will work, if you don't use any package on conda-forge that depends on |
has their been any updates on this? from what i can see opencv was flagged as posing "systemic" risk and the correct way to do that relies on getting OpenCV to make the Qt portion a plugin, which seems to have had no progress. |
Increasing the number of configurations would (in my mind) make this package more difficult to maintain. I understand that you may have constraints to try to reduce the size of your package. That is somewhat reasonable. You can fork conda-forge recipes and remove the Qt dependency. I do this for my own projects where I require special configurations. Other solutions include working with upstream to make the package optionally depend on qt instead of having qt as a hard dependency. unless an other long term maintainer of conda-forge steps in, I don't want to take on the additional burden of the different configurations. |
For people that want a headless version, I might suggest that we start by building out a few packages;
to help mamba find solutions that avoid the qt dependency. I'm taking inspiration from @ocefpaf's recipe where While this does "blow up" the build matrix, I feel like it might be ok. |
it might be ok since it gives people an easy way to say: "my environment is devoid of a graphical interface, please do not install qt at all in my environment". This would help pick out the correct version of opencv, but also of other packages. |
See conda-forge/opencv-feedstock#293 and more recent interest: conda-forge#25669 @conda-forge/qt-main requests for comments and thoughts is greatly appreciated @ocefpaf one of my concerns was about "maintainability" of this package. It seems that the only way to update such a package is through repodata patches. As such, I decided to create out of an abundance of caution a noqt4 package. Let me know what you think.
A kind of related but orthogonal issue (that probably can be spin-off in a separate discussion, feel free to do so if yo think it is the case) is "when should To make a concrete example stemming from a discussion with @roaldarbol . Let's say you installing the following environment:
The last command will install the Clearly, this is the tradeoff between two "evils", i.e. :
Currently we have E2, but I personally think that E1 is the lesser evil. |
we got opencv-python to showup (i htink you did that actually), we should just say that we also provide Pip packagers have just used it for their projects to avoid big downloads. |
Great, I can add opencv-python-headless! |
I feel like there might be something else that we also want to do. I remember seeing a list somewhere at conda-forge for the "translation" between certain pypi packages and those of conda-forge. we should add that |
I already opened conda/grayskull#530, I can also add it in https://github.com/regro/cf-scripts/blob/master/conda_forge_tick/pypi_name_mapping_static.yaml even if I am not sure where this file is used. |
Thank you. https://github.com/regro/cf-scripts/blob/master/conda_forge_tick/pypi_name_mapping_static.yaml is what I was looking for. |
Ok with the exception f the Feedback and review appreciated. |
While we have expanded our build matrix, I think that this is the reasonable course of action given the existing resources. I've pinned #401 to guide users through. @traversaro also has a PR to staged recipes to help with opengl requirements. Thank you @mshabunin for the insightful discussion. Hopefully you can keep this in mind upstream as new opencv build requirements are added! |
See conda-forge/opencv-feedstock#293 and more recent interest: conda-forge#25669 @conda-forge/qt-main requests for comments and thoughts is greatly appreciated @ocefpaf one of my concerns was about "maintainability" of this package. It seems that the only way to update such a package is through repodata patches. As such, I decided to create out of an abundance of caution a noqt4 package. Let me know what you think.
See conda-forge/opencv-feedstock#293 and more recent interest: conda-forge#25669 @conda-forge/qt-main requests for comments and thoughts is greatly appreciated @ocefpaf one of my concerns was about "maintainability" of this package. It seems that the only way to update such a package is through repodata patches. As such, I decided to create out of an abundance of caution a noqt4 package. Let me know what you think.
Would it be possible to have a "headless" version of opencv in conda-forge?
The text was updated successfully, but these errors were encountered: