- Requirements:
poetry==^1.8
,python==^3.10
- Download the
model.onnx
andmodel.onnx.data
files from aapot/bge-m3-onnx and move them to themodels
directory.
-
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.py
poetry 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-compose
docker-compose up