m3e-small Embeddings api by FastAPI
Refer to bge-api
python
>>>from huggingface_hub import snapshot_download
>>>snapshot_download(repo_id="moka-ai/m3e-small",cache_dir="./cache", local_dir="models/m3e-small")
pip install -r requirements.txt
python main.py
docker build -t m3e-small-api .
CPU
docker run -d --name m3e-small-api -p 6008:6008 m3e-small-api
GPU
# required nvidia-docker2
docker run -d --name m3e-small-api --gpus all -p 6008:6008 m3e-small-api