Reduce Yocto image size

here is a document showing how to run additional python library in RAM, maybe it can help you:

Also you might need to see if you can use AT!PARTITION to enlarge the rootFS partition.