-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 新增 Milvus 服务配置 2. 新增知识库对应embedding服务配置 3. 调整部署脚本,优化ci 配置 4. 更新bisheng-langchain 包,支持本地打包 5. 其他bug 修复
- Loading branch information
Showing
28 changed files
with
596 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
name: release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
branches: | ||
- "release" | ||
|
||
env: | ||
DOCKERHUB_REPO: dataelement/ | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
#if: startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: | | ||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
# 构建 bisheng-langchain | ||
- name: Set python version 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Build PyPi bisheng-langchain and push | ||
id: pypi_build_bisheng_langchain | ||
run: | | ||
pip install Cython | ||
pip install wheel | ||
pip install twine | ||
cd ./src/bisheng-langchain | ||
python setup.py bdist_wheel | ||
repo="http://110.16.193.170:50083/repository/pypi-hosted/" | ||
twine upload --verbose -u ${{ secrets.NEXUS_USER }} -p ${{ secrets.NEXUS_PASSWORD }} --repository-url $repo dist/*.whl | ||
# 发布到 | ||
- name: Login | ||
uses: docker/login-action@v2 | ||
with: | ||
# GitHub Repo => Settings => Secrets 增加 docker hub 登录密钥信息 | ||
# DOCKERHUB_USERNAME 是 docker hub 账号名. | ||
# DOCKERHUB_TOKEN: docker hub => Account Setting => Security 创建. | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# 构建 backend 并推送到 Docker hub | ||
- name: Build backend and push | ||
id: docker_build_backend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
# backend 的context目录 | ||
context: "./src/backend/" | ||
# 是否 docker push | ||
push: true | ||
# docker build arg, 注入 APP_NAME/APP_VERSION | ||
build-args: | | ||
APP_NAME="bisheng-backend" | ||
APP_VERSION="release" | ||
# 生成两个 docker tag: ${APP_VERSION} 和 latest | ||
tags: | | ||
${{ env.DOCKERHUB_REPO }}bisheng-backend:release | ||
# 构建 Docker frontend 并推送到 Docker hub | ||
- name: Build frontend and push | ||
id: docker_build_frontend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
# frontend 的context目录 | ||
context: "./src/frontend/" | ||
# 是否 docker push | ||
push: true | ||
# docker build arg, 注入 APP_NAME/APP_VERSION | ||
build-args: | | ||
APP_NAME="bisheng-frontend" | ||
APP_VERSION="release" | ||
# 生成两个 docker tag: ${APP_VERSION} 和 latest | ||
tags: | | ||
${{ env.DOCKERHUB_REPO }}bisheng-frontend:release | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ build/ | |
./third_party | ||
output/ | ||
develop-eggs/ | ||
config.dev.yaml | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
# 数据库配置 | ||
database_url: | ||
"mysql+pymysql://username:[email protected]:3306/bisheng" | ||
"mysql+pymysql://root:1234@mysql:3306/bisheng" | ||
redis_url: | ||
"192.168.106.116:6379" | ||
"redis:6379" | ||
|
||
# 为知识库的embedding进行模型撇脂 | ||
embedding_config: | ||
text-embedding-ada-002: | ||
base_url: | ||
"" | ||
multilingual-e5-large: | ||
base_url: | ||
"" | ||
knowledges: | ||
embeddings: | ||
text-embedding-ada-002: | ||
openai_api_base: "https://api.openai.com/v1/" | ||
openai_proxy: "" | ||
openai_api_key: "" | ||
vectorstores: | ||
# Milvus 最低要求cpu 4C 8G 推荐4C 16G | ||
Milvus: # 如果需要切换其他vectordb,确保其他服务已经启动,然后配置对应参数 | ||
connection_args = {'host': '110.16.193.170', 'port': '50032', 'user': '', 'password': '', 'secure': False} | ||
|
||
agents: | ||
ZeroShotAgent: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.