How can we store multiple embeddings and combine into single embedding?

I am going through following notebook using google colab.
https://github.com/UKPLab/sentence-transformers/blob/master/examples/applications/image-search/Image_Search.ipynb

My colab is failed because the model.encode function took all the RAM. so i decided to store the embeddings for every 1000 image files and finally combine all the embeddings into to a single file.

Anyone knows how to do it?