AliceVision icon indicating copy to clipboard operation
AliceVision copied to clipboard

Alicevision build (docker or otherwise) has a memory issue while building, and crashes the system

Open sanchayanghosh opened this issue 1 year ago • 2 comments

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.

sanchayanghosh avatar Aug 06 '22 18:08 sanchayanghosh

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!

fabiencastan avatar Aug 07 '22 23:08 fabiencastan

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.

sanchayanghosh avatar Aug 09 '22 08:08 sanchayanghosh