Embedding service with mosec that is compatible with OpenAI embedding API.
EMB_MODEL=thenlper/gte-base python main.py
You can find more embedding models from the HuggingFace Embedding LeaderBoard.
envd up
You can use the prebuilt image from DockerHub: kemingy/mosec-emb-cpu.
docker run --rm -p 8000:8000 kemingy/mosec-emb-cpu:latest
Or build your own image:
# docker
docker build .
# envd
envd build :serving
python client.py