AliceVision
AliceVision copied to clipboard
Alicevision build (docker or otherwise) has a memory issue while building, and crashes the system
When building alicevision using cmake, the default docker script uses all threads of the CPU when building, which while fast, can use more memory than the system can provide. So, on systems with low memory, this can crash the system, often going back to the login screen of the desktop environment.
The fix here is to check the free memory on the system, and to set number of cmake jobs to 1 job per gigabyte of free memory. This allows alicevision to build the docker images required.
Yes, I agree. We should check the RAM to guarantee a minimal amount of RAM per thread. A Pull Request to fix that would be more than welcome!
Once you are okay with the #1203 . I planned on implementing the same change on the centos image, in a different commit. This way, should there be any improvements I can incorporate, I can do so in this and simply mirror the changes onto the docker centos scripts.