-
Notifications
You must be signed in to change notification settings - Fork 12
Update installation instructions for PCT #69
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
base: main
Are you sure you want to change the base?
Conversation
Added instructions for creating a Python virtual environment and compiling PCT to have python wrapping
SimonRit
left a comment
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.
Thanks a lot @tbaudier. I'm not so sure we should use indicate make install in this documentation. What was the motivation?
Note that the commit message must be edited, a DOC: prefix is missing. See
https://docs.itk.org/en/latest/contributing/index.html
(we follow ITK guidelines as it is an ITK module).
|
|
||
| ### Create a python virtual environment | ||
|
|
||
| If you want to use PCT as a python module, it's preferable to create a new virtual environement. Numpy is also mandatory to compile ITK python wrapping: |
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.
Replace "compile" with "use" I guess?
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 used "compile" because numpy is necessary during cmake configuration of ITK in order to have the wrappings
| -DModule_CudaCommon=ON \ | ||
| -DModule_CudaCommon_GIT_TAG=ON \ |
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 would remove the Cuda options in this documentation.
| cmake \ | ||
| -DITK_WRAP_PYTHON=ON \ | ||
| -DModule_RTK=ON \ | ||
| -DModule_RTK_GIT_TAG=main \ |
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 think main is necessary, I would remove.
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 did not succeed to compile ITK v6.0a1 with the tagged version of RTK and CudaCommon
| ``` | ||
|
|
||
| ITK uses [CMake](https://cmake.org) as its building tool. Below is an example of how to configure ITK, but feel free to edit the options as needed. | ||
| ITK uses [CMake](https://cmake.org) as its building tool. Below is an example of how to configure ITK, but feel free to edit the options as needed (works with ITK v6.0a1). |
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 would remove this added reference to ITK v6.0a1 which will soon be outdated.
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 did not succeed to compile RTK with ITK v6.0a2
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 want to support ITK alpha versions and even less indicate versions numbers in the documentation. So it's either main branches for all modules or latest release (ITK v5.4.5). @axel-grc can you please clarify the status of the RTK main and v2.7.0 compilation against ITK main, ITK v5.4.5 and ITK v6.0b02? Thanks, for the record the list of ITK tags:
https://github.com/InsightSoftwareConsortium/ITK/tags
| ../ITK | ||
| ``` | ||
| `ITK_WRAP_PYTHON` mean that ITK will generate and compile Python wrapping for the C++ code, which is also supported by PCT. This option massively increases compilation time, so if Python wrappings are not needed, this option can be disabled. `Module_RTK` enables the compilation of RTK, which is required for PCT. | ||
| `ITK_WRAP_PYTHON` mean that ITK will generate and compile Python wrapping for the C++ code, which is also supported by PCT. This option massively increases compilation time, so if Python wrappings are not needed, this option can be disabled. `Module_RTK` enables the compilation of RTK, which is required for PCT. And CudaCommon is necesary if you want to use your GPU. |
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.
Remove, there is no GPU code in PCT
| `ITK_WRAP_PYTHON` mean that ITK will generate and compile Python wrapping for the C++ code, which is also supported by PCT. This option massively increases compilation time, so if Python wrappings are not needed, this option can be disabled. `Module_RTK` enables the compilation of RTK, which is required for PCT. And CudaCommon is necesary if you want to use your GPU. | ||
|
|
||
| Once configuration finishes, the compilation is started using | ||
| Once configuration finishes, the compilation is started using. The installation allows you to have access in your python virtual environment if it was activated before. |
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.
This sentence was added in the middle of an unfinished one and I don't really understand what it means...
| ```bash | ||
| cmake \ | ||
| -DITK_DIR=<path to ITK build folder> \ | ||
| -DCMAKE_INSTALL_PREFIX=<path-to>/pct-install |
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.
Does this actually work? I think you cannot install Python compilation of a remote module if it is compiled independently of ITK. See
https://github.com/RTKConsortium/RTK/blob/main/CMakeLists.txt#L349
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.
it works for me with PCT
Added instructions for creating a Python virtual environment and compiling PCT to have python wrapping