This commit is contained in:
1
.env
1
.env
@@ -1,4 +1,3 @@
|
|||||||
LOCAL_MODEL_PATH=gemma-4-E2B-it
|
|
||||||
ZHIPUAI_API_KEY=4d568a4367f1442bbc226cc0daf84566.44SsKVWkVIM2Mkeg
|
ZHIPUAI_API_KEY=4d568a4367f1442bbc226cc0daf84566.44SsKVWkVIM2Mkeg
|
||||||
VLLM_LOCAL_KEY=token-abc123
|
VLLM_LOCAL_KEY=token-abc123
|
||||||
EOF
|
EOF
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# AI Agent 环境变量配置模板
|
|
||||||
# 复制此文件为 .env 并填入真实的 API Key
|
|
||||||
LOCAL_MODEL_PATH=gemma-4-E2B-it
|
|
||||||
# 智谱 AI API Key(必需)
|
|
||||||
# 获取地址: https://open.bigmodel.cn/
|
|
||||||
ZHIPUAI_API_KEY=4d568a4367f1442bbc226cc0daf84566.44SsKVWkVIM2Mkeg
|
|
||||||
|
|
||||||
# vLLM 本地模型 Token(可选,仅使用本地模型时需要)
|
|
||||||
VLLM_LOCAL_KEY=token-abc123
|
|
||||||
@@ -11,34 +11,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 设置 Python 3.11
|
- name: 检查 Python 环境
|
||||||
uses: actions/setup-python@v4.7.1
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: 缓存 pip 依赖
|
|
||||||
uses: actions/cache@v3.3.2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirement.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: 安装 Python 依赖 (仅用于验证)
|
|
||||||
run: pip install -r requirement.txt
|
|
||||||
|
|
||||||
- name: 准备环境变量文件
|
|
||||||
run: |
|
run: |
|
||||||
cat > .env << EOF
|
python3 --version
|
||||||
ZHIPUAI_API_KEY=${{ secrets.ZHIPUAI_API_KEY }}
|
pip3 --version
|
||||||
VLLM_LOCAL_KEY=${{ secrets.VLLM_LOCAL_KEY }}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: 重新构建并启动前后端服务(不影响数据库)
|
- name: 构建并启动前后端服务(环境变量注入)
|
||||||
run: docker compose up -d --build backend frontend
|
env:
|
||||||
|
ZHIPUAI_API_KEY: ${{ secrets.ZHIPUAI_API_KEY }}
|
||||||
|
VLLM_LOCAL_KEY: ${{ secrets.VLLM_LOCAL_KEY }}
|
||||||
|
run: |
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
docker compose up -d --build backend frontend
|
||||||
|
|
||||||
- name: 健康检查
|
- name: 健康检查
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user