Repository navigation
Workflows to produce binaries - #8
Conversation
…e two other demos. Also did some minor refactoring.
…ning a single demo
…ic python3.x versions instead - different wheel for individual python versions
…currently, as SimpleITK is not supported on Python 3.10 (yet). Also swapped plt.show with plt.savefig for all demos
| @@ -92,13 +95,16 @@ def finalize_options(self): | |||
| ext_modules = [module1, module2, module3], | |||
There was a problem hiding this comment.
Can you increase the version to the next version, say 0.2.1.2?
There was a problem hiding this comment.
I'm not sure it is necessary to make a new patch release, as no real changes to the library itself were made. The binaries should be identical to if you were to install this yourself (or at least that was the goal). If you want to make a new patch release, I gues you can do so, if you'd like, but I don't see it is as a necessity for this PR. But up to you :]
| 'Programming Language :: Python', | ||
| 'Programming Language :: Python :: 2', | ||
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3 :: Only', |
There was a problem hiding this comment.
I know Python 2 is deprecated, but unsure if anyone is using it still. I hope it is safe to remove python 2 from build here for this version.
There was a problem hiding this comment.
I think there are numerous dependencies here which do not support Python 2. Today, most libraries only support Python >= 3.6.
Python 2 is also no longer developed or maintained, so I would certaintly remove support for it in 2022. However, there might be some that still use older versions of Python 3. Up to you and the SimpleCRF team if this is something you want.
|
Any updates on this? |
Not really up to me. But if we hear nothing from the owner, @taigw, I could make a temporary PyPI project called SimpleCRF-binaries, which has this fix. However, the easiest solution is just to accept this PR and add the binaries. |
|
i think lets go with plan-b.. it's been a while.. we don't see any chances to see this PR getting merged... may be once it's merged, we can start using regular simplecrf package from PIP... @andreped thanks for helping on this.. we can create SimpleCRF-bin (or any other name that makes sense) as alternative package and MONAILabel will start using them for now.. |
|
@SachidanandAlle I can make the PyPI repo, as I was the one making these edits. I can give you admin rights to the repo, if you'd like. I will use my fork as base. |
|
@SachidanandAlle I have created the temporary PyPI project: To install simple run the command: Let me know if there are any issues. As this is a temporary solution, I only made the minimal necessary edits to make this work. |
|
@andreped Is there a reason why the macOS whl for Python 3.9 is the only one that has minimum requirement of macOS 10.15 (SimpleCRF_binaries-0.2.1.1-cp39-cp39-macosx_10_15_x86_64.whl) compared to macOS 10.14 for the other whl files? Also in 3D Slicer as of right now soon to be released Slicer 5.0 has minimum support for macOS 10.13. We are actually not using the latest numpy version because it bumped its minimum macOS whl version to macOS 10.14. See Slicer/Slicer@81517ef. |
|
@jamesobutler I believe this happened automatically. AFAIK, if you build wheels using GitHub Actions, only macOS >= 10.15 is supported. It sucks because quite often 10.13-10.14 are used in production. But there is little I can do about it. There is something called CMAKE_OSX_DEPLOYMENT_TARGET which you can set, at least for CMake, that solves this issue. However, I have tried to have a similar fix for Python projects, and I have not gotten it to work. There is also this answer from the GitHub team: this... But maybe you have solved this somehow for MONAI Label, @SachidanandAlle, @masadcv? I could incorporate your fix to support more macOS versions. But yeah, I could do some tests at my side. However, it is a bit challenging, as I would have to build on the cloud and run tests on a local macOS 10.13 machine... To produce the binaries for the new PyPI project, I am working on a separate branch: https://github.com/andreped/SimpleCRF/tree/binaries If you find a fix, you can let me know where to add it. |
|
@jamesobutler I have tried to fix this in the latest release candidate now: At least I was able to install it and import "denseCRF" and "maxflow". You still need to upgrade numpy. But since MONAI Label has chosen to not use SimpleCRF in the future, due to licensing issue, I guess these fixes will only be relevant for the SimpleCRF community. These edits are in the binaries branch of my fork. |
|
@taigw Hello! Is it possible to merge this and make a new patch release such that when installing from PyPI you install through the binary wheels? |
As discussed in this issue #7 there was a need for binaries to more easily install SimpleCRF on different platforms.
This was especially relevant for Windows which required VS and Visual C++ build tools to be able to install SimpleCRF as it needs to be built from scratch when installing.
I mostly focused on adding and improving the workflows, but I found it relevant to make some minor adjustments as well.
Lots of time (and commits) was spent in trying to get the demos to run on the cloud. However, the demos include
plt.show()and when these are run on a headless machine it resulted in hangs (or so it seemed). Therefore, these unit tests I added were removed for now, to be added in the future I suppose (if of interest).Changes:
input(), which does not require user input (args necessary to run demos on the cloud with GitHub Action)EDIT:
plt.show()withplt.savefig(), as these are run on a headless server