gift-surg / NiftyMIC

NiftyMIC is a research-focused toolkit for motion correction and volumetric image reconstruction of 2D ultra-fast MRI.
BSD 3-Clause "New" or "Revised" License
139 stars 35 forks source link

Adding the NiftyMIC virtual box as a release asset in GitHub #2

Open tvercaut opened 5 years ago

tvercaut commented 5 years ago

For future proofing etc., it would be great to start having tagged releases of NIftyMIC & co.

This would also allow storing large binary files as part of the release assets on GitHub: https://help.github.com/articles/distributing-large-binaries/

Ideally, the virtual box would sit there as well. However, it would need cutting down its size below 2Gb. Might this be feasible by using a minimalistic OS in it? For example Bodhi linux + virtual box seems to fit in 600Mb: https://www.osboxes.org/bodhi-linux/

Or even smaller:

How much does all the rest take?

renbem commented 5 years ago

Thanks for the suggestions! Indeed, since version 0.5.1, NiftyMIC applications automatically export the version/release number in addition to the parameter settings into a JSON config file at each execution for increased transparency.

Regarding the second point: Having a more lightweight virtual machine would be fantastic. I already tried Lubuntu 18.04 which only provided a minor size reduction but caused troubles for visualizations using ITK-SNAP/FSLeyes. After playing around with some other Linux distributions I went back to Ubuntu 18.04 as I could ensure that everything works. I have to admit that I have not tried Bodhi or Tiny Core yet which might be good alternatives. However, the main contributor in storage space currently is the build-folder of ITK_NiftyMIC (i.e. ITK essentially) which amounts to ~8.2GB alone (uncompressed) with the required Python wrappings. Given this constraint, it seems tricky to go below 2GB at the moment. However, I hope we make progress on that too and I am grateful for any suggestion in how to achieve that :)

tvercaut commented 5 years ago

Ouch! Changing the distro won't help much at this stage... Do you keep only the necessary things from the build and don't build unnecessary things (e.g. unit tests)? Also are you using dynamic libraries?

In any case, this could be an interesting read: https://discourse.itk.org/t/mix-shared-and-static-libraries-to-reduce-bloat/795

You should only enable the minimum amount of modules, see e.g.: https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation/blob/master/examples/CMakeLists.txt

tvercaut commented 5 years ago

Also, the binaries for simpleitk are quite small in comparison: https://github.com/SimpleITK/SimpleITK/releases