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

I am going through following notebook using google colab.

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?