chroma 安装(docker)
docker pull chromadb/chroma:0.5.9
运行:
cat chromadb.sh
#! /bin/bash
docker run -d \
--name chromadb \
-p 16990:8000 \
-v /data/chromadb/data:/study/ai/chroma \
-e IS_PERSISTENT=TRUE \
-e ANONYMIZED_TELEMETRY=TRUE \
chromadb/chroma:0.5.9
访问验证:
http://10.0.0.215:16990/docs
代码测试:
import chromadb
# chroma_client = chromadb.HttpClient(host='10.0.0.215', port=8000)
chroma_client = chromadb.HttpClient(host='10.0.0.215', port=16990)
print(chroma_client.database)