- Requirements:
poetry==^1.8,python==^3.10 - Download the
model.onnxandmodel.onnx.datafiles from aapot/bge-m3-onnx and move them to themodelsdirectory.
-
Clone this repository
git clone https://github.com/myeolinmalchi/bge-m3-fastapi.git cd bge-m3-fastapi -
Install dependencies
poetry shell poetry install --no-root
-
Run
main.pypoetry run python3.10 main.py --device <device type> --batch_size <batch size> --device: device type for onnxruntime (cpu/cuda, default: cpu) --batch_size: concurrency limit for onnxruntime (default: 2)
-
Clone this repository
git clone https://github.com/myeolinmalchi/bge-m3-fastapi.git cd bge-m3-fastapi -
Run
docker-composedocker-compose up