feat(deepdata): 引入修改密码、文件预览组件与清洗算子增强,deepflow 改名为 deep-flow
本次同步 09-12 至 09-28 的代码变更,主要内容: 新增功能 - 修改密码:后端新增 ChangePasswordRequest DTO 与UserController/UserService 对应接口,前端新增 ChangePasswordDialog 并在 Header 接入入口 - 文件预览组件重构:file-preview 目录拆分出 VideoPreview(支持 blobUrl 直传)、 ImagePreview、AudioPreview,index.tsx 统一调度各类型预览器 - 新增 my_ops 算子模块:markitdown_parser、mineru_pdf_parser、text_quality_evaluator - 新增 tools/minio-file-server MinIO 文件服务 功能增强 - 数据清洗:cleaning_task_service/scheduler/routes 重构, data_juicer_executor 与 wrapper 增强,OperatorTable/LogsTable/TaskDetail 同步调整 - 数据标注:annotation sync.py、project.py 接口与schema 更新 - 数据采集、算子市场、首页与菜单路由相关页面调整 - DataJuicer 算子接入(useOperatorOperations、dj_ops_schema) 结构调整 - deepflow/ 更名为 deep-flow/(419 个文件重命名) - 新增 helm 部署编排、GitHub Actions 之外的自建镜像构建脚本 未纳入本次提交 - scripts-backup/、runtime/python-executor-backup/、components_backup/(备份目录) - *.backup*、__pycache__ 产物 - zh_core_web_sm-3.8.0-py3-none-any.whl(46MB 构建产物) - DataX/(内嵌独立仓库,远程亦未收录其源码)
This commit is contained in:
+107
-107
@@ -1,107 +1,107 @@
|
||||
# DeepData Python Service (DeepData)
|
||||
|
||||
这是 DeepData 的 Python 服务,负责DeepData的数据合成、数据标注、数据评估等功能。
|
||||
|
||||
## 简要说明
|
||||
|
||||
- 框架:FastAPI
|
||||
- 异步数据库/ORM:SQLAlchemy (async)
|
||||
- 数据库迁移:Alembic
|
||||
- 运行器:uvicorn
|
||||
|
||||
## 快速开始(开发)
|
||||
|
||||
### 前置条件
|
||||
|
||||
- Python 3.11+
|
||||
- poetry 包管理器
|
||||
|
||||
1. 克隆仓库
|
||||
```bash
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
```
|
||||
2. 进入项目目录
|
||||
```bash
|
||||
cd runtime/deepdata-python
|
||||
```
|
||||
|
||||
3. 安装依赖
|
||||
由于项目使用poetry管理依赖,你可以使用以下命令安装::
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
poetry install
|
||||
```
|
||||
或者直接使用pip安装(如果poetry不可用):
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
4. 配置环境变量
|
||||
复制环境变量示例文件并配置:
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
cp .env.example .env
|
||||
```
|
||||
编辑.env文件,设置必要的环境变量,如数据库连接、Label Studio配置等。
|
||||
|
||||
5. 数据库迁移(开发环境):
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
alembic upgrade head
|
||||
```
|
||||
|
||||
6. 启动开发服务器(示例与常用参数):
|
||||
|
||||
- 本地开发(默认 host/port,自动重载):
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
set -a && source .env && set +a && poetry run uvicorn app.main:app --port 18000 --log-level debug --reload
|
||||
```
|
||||
或者
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
poetry run python -m app.main
|
||||
```
|
||||
|
||||
- 指定主机与端口并打开调试日志:
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level debug
|
||||
```
|
||||
|
||||
- 在生产环境使用多个 worker(不使用 --reload):
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4 --log-level info --proxy-headers
|
||||
```
|
||||
|
||||
- 使用环境变量启动(示例):
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
HOST=0.0.0.0 PORT=8000 uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
注意:
|
||||
|
||||
- `--reload` 仅用于开发,会监视文件变化并重启进程;不要在生产中使用。
|
||||
- `--workers` 提供并发处理能力,但会增加内存占用;生产时通常配合进程管理或容器编排(Kubernetes)使用。
|
||||
- 若需要完整的生产部署建议使用 ASGI 服务器(如 gunicorn + uvicorn workers / 或直接使用 uvicorn 在容器中配合进程管理)。
|
||||
|
||||
访问 API 文档:
|
||||
|
||||
- Swagger UI: http://127.0.0.1:8000/docs
|
||||
- ReDoc: http://127.0.0.1:8000/redoc (推荐使用)
|
||||
|
||||
## 开发新功能
|
||||
- 安装开发依赖:
|
||||
|
||||
git clone https://gitea.apescale.com/figmar/deepdata.git
|
||||
poetry add xxx
|
||||
```
|
||||
|
||||
|
||||
## 使用(简要)
|
||||
|
||||
- 所有 API 路径以 `/api` 前缀注册(见 `app/main.py` 中 `app.include_router(api_router, prefix="/api")`)。
|
||||
- 根路径 `/` 返回服务信息和文档链接。
|
||||
|
||||
更多细节请查看 `doc/usage.md`(接口使用)和 `doc/development.md`(开发说明)。
|
||||
# DeepData Python Service (DeepData)
|
||||
|
||||
这是 DeepData 的 Python 服务,负责DeepData的数据合成、数据标注、数据评估等功能。
|
||||
|
||||
## 简要说明
|
||||
|
||||
- 框架:FastAPI
|
||||
- 异步数据库/ORM:SQLAlchemy (async)
|
||||
- 数据库迁移:Alembic
|
||||
- 运行器:uvicorn
|
||||
|
||||
## 快速开始(开发)
|
||||
|
||||
### 前置条件
|
||||
|
||||
- Python 3.11+
|
||||
- poetry 包管理器
|
||||
|
||||
1. 克隆仓库
|
||||
```bash
|
||||
git clone git@github.com:ModelEngine-Group/DeepData.git
|
||||
```
|
||||
2. 进入项目目录
|
||||
```bash
|
||||
cd runtime/deepdata-python
|
||||
```
|
||||
|
||||
3. 安装依赖
|
||||
由于项目使用poetry管理依赖,你可以使用以下命令安装::
|
||||
```bash
|
||||
poetry install
|
||||
```
|
||||
或者直接使用pip安装(如果poetry不可用):
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
4. 配置环境变量
|
||||
复制环境变量示例文件并配置:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
编辑.env文件,设置必要的环境变量,如数据库连接、Label Studio配置等。
|
||||
|
||||
5. 数据库迁移(开发环境):
|
||||
|
||||
```bash
|
||||
alembic upgrade head
|
||||
```
|
||||
|
||||
6. 启动开发服务器(示例与常用参数):
|
||||
|
||||
- 本地开发(默认 host/port,自动重载):
|
||||
|
||||
```bash
|
||||
set -a && source .env && set +a && poetry run uvicorn app.main:app --port 18000 --log-level debug --reload
|
||||
```
|
||||
或者
|
||||
```bash
|
||||
poetry run python -m app.main
|
||||
```
|
||||
|
||||
- 指定主机与端口并打开调试日志:
|
||||
|
||||
```bash
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level debug
|
||||
```
|
||||
|
||||
- 在生产环境使用多个 worker(不使用 --reload):
|
||||
|
||||
```bash
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4 --log-level info --proxy-headers
|
||||
```
|
||||
|
||||
- 使用环境变量启动(示例):
|
||||
|
||||
```bash
|
||||
HOST=0.0.0.0 PORT=8000 uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
注意:
|
||||
|
||||
- `--reload` 仅用于开发,会监视文件变化并重启进程;不要在生产中使用。
|
||||
- `--workers` 提供并发处理能力,但会增加内存占用;生产时通常配合进程管理或容器编排(Kubernetes)使用。
|
||||
- 若需要完整的生产部署建议使用 ASGI 服务器(如 gunicorn + uvicorn workers / 或直接使用 uvicorn 在容器中配合进程管理)。
|
||||
|
||||
访问 API 文档:
|
||||
|
||||
- Swagger UI: http://127.0.0.1:8000/docs
|
||||
- ReDoc: http://127.0.0.1:8000/redoc (推荐使用)
|
||||
|
||||
## 开发新功能
|
||||
- 安装开发依赖:
|
||||
|
||||
```bash
|
||||
poetry add xxx
|
||||
```
|
||||
|
||||
|
||||
## 使用(简要)
|
||||
|
||||
- 所有 API 路径以 `/api` 前缀注册(见 `app/main.py` 中 `app.include_router(api_router, prefix="/api")`)。
|
||||
- 根路径 `/` 返回服务信息和文档链接。
|
||||
|
||||
更多细节请查看 `doc/usage.md`(接口使用)和 `doc/development.md`(开发说明)。
|
||||
|
||||
Reference in New Issue
Block a user