AiDB deployed as the server by go-zeros.
- Ubuntu 20.04.4 LTS
- go version go1.20.5 linux/amd64
- Clone AiDB
git clone https://github.com/TalkUHulk/ai.deploy.box
- Compile AiDB library(custom backend)
cd ai.deploy.box
mkdir build && cd build
cmake -DC_API=ON -DENGINE_ORT=ON -DENGINE_MNN=ON -DENGINE_NCNN=ON -DENGINE_TNN=OFF -DENGINE_OPV=OFF -DENGINE_PPLite=OFF -DENGINE_NCNN_WASM=OFF -DBUILD_SAMPLE=OFF ../
make -j8
generate libAiDB_C.so in ai.deploy.box/build/source/ and put it in internal/aidb/lib
- prepare files demo need.
download models and unzip it then rename models, and put ai.deploy.box/extra、ai.deploy.box/config in aidb_go_demo/extra、 aidb_go_demo/config
put aidb_c_api.h in internal/aidb/include.
- modify port
custom aidb.yaml
- Run
export LD_LIBRARY_PATH=internal/aidb/lib:$LD_LIBRARY_PATH
go run aidb.go
- Test
reference aidb_client.py