add readme and docker compose
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# AI项目配置文件
|
# AI项目配置文件
|
||||||
# API配置
|
# API配置
|
||||||
API_KEY=
|
API_KEY=
|
||||||
MODEL=
|
MODEL=qwen3-max
|
||||||
BASE_URL=
|
BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
|
||||||
|
|
||||||
# FastAPI 配置
|
# FastAPI 配置
|
||||||
FASTAPI_HOST=0.0.0.0
|
FASTAPI_HOST=0.0.0.0
|
||||||
|
|||||||
49
README.md
Normal file
49
README.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Bosch AI Agent
|
||||||
|
|
||||||
|
## 启动方式
|
||||||
|
|
||||||
|
### 方式一:Docker Compose(推荐)
|
||||||
|
|
||||||
|
确保已登录镜像仓库:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker login dcr-by1jwyxk44.71826370.xyz -u whlaoding
|
||||||
|
```
|
||||||
|
|
||||||
|
启动服务:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
服务启动后访问:http://localhost:8000
|
||||||
|
|
||||||
|
> 停止服务:`docker compose down`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 方式二:本地直接运行
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
> 需要本地已安装 Python 3.11+,首次运行会自动创建虚拟环境并安装依赖。
|
||||||
|
|
||||||
|
服务启动后访问:http://localhost:8000
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 环境变量
|
||||||
|
|
||||||
|
复制 `.env-example` 为 `.env` 并填写配置:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp .env-example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
| 变量 | 说明 |
|
||||||
|
|------|------|
|
||||||
|
| `API_KEY` | AI 接口密钥 |
|
||||||
|
| `MODEL` | 使用的模型名称 |
|
||||||
|
| `BASE_URL` | AI 接口地址 |
|
||||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: dcr-by1jwyxk44.71826370.xyz/bosch-demo2-zc:1.0
|
||||||
|
pull_policy: always
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- PYTHONUNBUFFERED=1
|
||||||
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user