Commenting out the cleanup call in src/pylorax/init.py rb.cleanup() gets rid of the issue of removing and reinstalling packages every time, but the size of the image grows with each rebuild. This suggests that there may be other files that actually need to be removed.
Cleanup is defined by a template in share/runtime-cleanup.tmpl. Create a new share/clip-runtime-cleanup.tmpl, which cleans up only what is necessary. Get rid of unnecessary removepkg entries in the new tmpl file.
Commenting out the cleanup call in src/pylorax/init.py
rb.cleanup()
gets rid of the issue of removing and reinstalling packages every time, but the size of the image grows with each rebuild. This suggests that there may be other files that actually need to be removed.Cleanup is defined by a template in share/runtime-cleanup.tmpl. Create a new share/clip-runtime-cleanup.tmpl, which cleans up only what is necessary. Get rid of unnecessary
removepkg
entries in the new tmpl file.This should drastically improve build times.