support oceanbase as an optional vector database (#1435)

Signed-off-by: shanhaikang.shk <shanhaikang.shk@oceanbase.com>
This commit is contained in:
GITHUBear
2024-04-24 16:08:30 +08:00
committed by GitHub
parent 91c1371234
commit 6520367623
10 changed files with 975 additions and 12 deletions

View File

@@ -2,6 +2,7 @@ ARG BASE_IMAGE="eosphorosai/dbgpt:latest"
FROM ${BASE_IMAGE}
RUN pip install dashscope
RUN apt-get update && apt-get install -y wget gnupg lsb-release net-tools
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
@@ -9,7 +10,7 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
RUN wget https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb
RUN dpkg -i mysql-apt-config_0.8.17-1_all.deb
RUN apt-get update && apt-get install -y mysql-server && apt-get clean
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C && apt-get update && apt-get install -y mysql-server && apt-get clean
# Remote access
RUN sed -i 's/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/g' /etc/mysql/mysql.conf.d/mysqld.cnf \

View File

@@ -0,0 +1,42 @@
version: '3.8'
services:
oceanbase:
image: oceanbase/oceanbase-ce:vector
ports:
- 2881:2881
networks:
- dbgptnet
dbgpt:
image: eosphorosai/dbgpt-allinone
environment:
- DBGPT_WEBSERVER_PORT=12345
- VECTOR_STORE_TYPE=OceanBase
- OB_HOST=oceanbase
- OB_HOST=127.0.0.1
- OB_PORT=2881
- OB_USER=root@test
- OB_DATABASE=test
- OB_SQL_DBG_LOG_PATH=/sql_log/sql.log
- LOCAL_DB_TYPE=sqlite
- LLM_MODEL=tongyi_proxyllm
- PROXYLLM_BACKEND=qwen-plus
- EMBEDDING_MODEL=text2vec
# your api key
# - TONGYI_PROXY_API_KEY={your-api-key}
- LANGUAGE=zh
# - OB_ENABLE_NORMALIZE_VECTOR=True
# - OB_ENABLE_INDEX=True
ports:
- 3306:3306
- 12345:12345
volumes:
# - {your-ob-sql-dbg-log-dir}:/sql_log
# - {your-model-dir}:/app/models
networks:
- dbgptnet
networks:
dbgptnet:
driver: bridge
name: dbgptnet