Skip to content

Commit 955bb46

Browse files
committed
feature: 支持算子上传创建
2 parents 2867f39 + 67eb571 commit 955bb46

187 files changed

Lines changed: 4939 additions & 2745 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build: backend-docker-build frontend-docker-build runtime-docker-build
1212

1313
.PHONY: create-namespace
1414
create-namespace:
15-
@kubectl get namespace $(NAMESPACE) > /dev/null 2>&1 || kubectl create namespace $(NAMESPACE)
15+
kubectl get namespace $(NAMESPACE) > /dev/null 2>&1 || kubectl create namespace $(NAMESPACE)
1616

1717
.PHONY: install-%
1818
install-%:
@@ -73,37 +73,61 @@ runtime-docker-build:
7373
label-studio-adapter-docker-build:
7474
docker build -t label-studio-adapter:$(VERSION) . -f scripts/images/label-studio-adapter/Dockerfile
7575

76+
.PHONY: deer-flow-docker-build
77+
deer-flow-docker-build:
78+
@if [ -d "../deer-flow/.git" ]; then \
79+
cd ../deer-flow && git pull; \
80+
else \
81+
git clone git@github.com:bytedance/deer-flow.git ../deer-flow; \
82+
fi
83+
sed -i "s/dark/light/g" "../deer-flow/web/src/components/deer-flow/theme-provider-wrapper.tsx"
84+
cp -n deployment/docker/deer-flow/.env.example ../deer-flow/.env
85+
cp -n deployment/docker/deer-flow/conf.yaml.example ../deer-flow/conf.yaml
86+
cd ../deer-flow && docker compose build
87+
7688
.PHONY: backend-docker-install
7789
backend-docker-install:
78-
cd deployment/docker/datamate && docker-compose up -d backend
90+
cd deployment/docker/datamate && docker compose up -d backend
7991

8092
.PHONY: backend-docker-uninstall
8193
backend-docker-uninstall:
82-
cd deployment/docker/datamate && docker-compose down backend
94+
cd deployment/docker/datamate && docker compose down backend
8395

8496
.PHONY: frontend-docker-install
8597
frontend-docker-install:
86-
cd deployment/docker/datamate && docker-compose up -d frontend
98+
cd deployment/docker/datamate && docker compose up -d frontend
8799

88100
.PHONY: frontend-docker-uninstall
89101
frontend-docker-uninstall:
90-
cd deployment/docker/datamate && docker-compose down frontend
102+
cd deployment/docker/datamate && docker compose down frontend
91103

92104
.PHONY: runtime-docker-install
93105
runtime-docker-install:
94-
cd deployment/docker/datamate && docker-compose up -d runtime
106+
cd deployment/docker/datamate && docker compose up -d runtime
95107

96108
.PHONY: runtime-docker-uninstall
97109
runtime-docker-uninstall:
98-
cd deployment/docker/datamate && docker-compose down runtime
110+
cd deployment/docker/datamate && docker compose down runtime
99111

100112
.PHONY: datamate-docker-install
101113
datamate-docker-install:
102-
cd deployment/docker/datamate && docker-compose up -d
114+
cd deployment/docker/datamate && cp -n .env.example .env && docker compose -f docker-compose.yml up -d
103115

104116
.PHONY: datamate-docker-uninstall
105117
datamate-docker-uninstall:
106-
cd deployment/docker/datamate && docker-compose down
118+
cd deployment/docker/datamate && docker compose -f docker-compose.yml down -v
119+
120+
.PHONY: deer-flow-docker-install
121+
deer-flow-docker-install:
122+
cd deployment/docker/datamate && cp -n .env.deer-flow.example .env && docker compose -f docker-compose.yml up -d
123+
cd deployment/docker/deer-flow && cp -n .env.example .env && cp -n conf.yaml.example conf.yaml && docker compose -f docker-compose.yml up -d
124+
125+
.PHONY: deer-flow-docker-uninstall
126+
deer-flow-docker-uninstall:
127+
@if docker compose ls --filter name=datamate | grep -q datamate; then \
128+
cd deployment/docker/datamate && docker compose -f docker-compose.yml up -d; \
129+
fi
130+
cd deployment/docker/deer-flow && docker compose -f docker-compose.yml down
107131

108132
.PHONY: datamate-k8s-install
109133
datamate-k8s-install: create-namespace

backend/api-gateway/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<parent>
99
<groupId>com.datamate</groupId>
10-
<artifactId>data-mate-platform</artifactId>
10+
<artifactId>datamate</artifactId>
1111
<version>1.0.0-SNAPSHOT</version>
1212
<relativePath>../pom.xml</relativePath>
1313
</parent>

backend/openapi/specs/data-management.yaml

Lines changed: 125 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ paths:
3939
schema:
4040
type: integer
4141
default: 0
42-
description: 页码,从0开始
42+
description: 页码,从1开始
4343
- name: size
4444
in: query
4545
schema:
@@ -65,7 +65,7 @@ paths:
6565
in: query
6666
schema:
6767
type: string
68-
enum: [ACTIVE, INACTIVE, PROCESSING]
68+
enum: [DRAFT, ACTIVE, PROCESSING, ARCHIVED, PUBLISHED, DEPRECATED]
6969
description: 数据集状态过滤
7070
responses:
7171
'200':
@@ -231,40 +231,6 @@ paths:
231231
schema:
232232
$ref: '#/components/schemas/PagedDatasetFileResponse'
233233

234-
post:
235-
tags: [DatasetFile]
236-
summary: 上传文件到数据集
237-
operationId: uploadDatasetFile
238-
description: 向指定数据集上传文件
239-
parameters:
240-
- name: datasetId
241-
in: path
242-
required: true
243-
schema:
244-
type: string
245-
description: 数据集ID
246-
requestBody:
247-
required: true
248-
content:
249-
multipart/form-data:
250-
schema:
251-
type: object
252-
properties:
253-
file:
254-
type: string
255-
format: binary
256-
description: 要上传的文件
257-
description:
258-
type: string
259-
description: 文件描述
260-
responses:
261-
'201':
262-
description: 上传成功
263-
content:
264-
application/json:
265-
schema:
266-
$ref: '#/components/schemas/DatasetFileResponse'
267-
268234
/data-management/datasets/{datasetId}/files/{fileId}:
269235
get:
270236
tags: [DatasetFile]
@@ -342,6 +308,78 @@ paths:
342308
type: string
343309
format: binary
344310

311+
/data-management/datasets/{datasetId}/files/download:
312+
get:
313+
tags: [ DatasetFile ]
314+
operationId: downloadDatasetFileAsZip
315+
summary: 下载文件
316+
description: 下载数据集中全部文件
317+
parameters:
318+
- name: datasetId
319+
in: path
320+
required: true
321+
schema:
322+
type: string
323+
description: 数据集ID
324+
responses:
325+
'200':
326+
description: 文件内容
327+
content:
328+
application/octet-stream:
329+
schema:
330+
type: string
331+
format: binary
332+
333+
/data-management/datasets/{datasetId}/files/upload/pre-upload:
334+
post:
335+
tags: [ DatasetFile ]
336+
operationId: preUpload
337+
summary: 切片上传预上传
338+
description: 预上传接口,返回后续分片上传所需的请求ID
339+
parameters:
340+
- name: datasetId
341+
in: path
342+
required: true
343+
schema:
344+
type: string
345+
description: 数据集ID
346+
requestBody:
347+
required: true
348+
content:
349+
application/json:
350+
schema:
351+
$ref: '#/components/schemas/UploadFilesPreRequest'
352+
responses:
353+
'200':
354+
description: 预上传成功,返回请求ID
355+
content:
356+
application/json:
357+
schema:
358+
type: string
359+
360+
/data-management/datasets/{datasetId}/files/upload/chunk:
361+
post:
362+
tags: [ DatasetFile ]
363+
operationId: chunkUpload
364+
summary: 切片上传
365+
description: 使用预上传返回的请求ID进行分片上传
366+
parameters:
367+
- name: datasetId
368+
in: path
369+
required: true
370+
schema:
371+
type: string
372+
description: 数据集ID
373+
requestBody:
374+
required: true
375+
content:
376+
multipart/form-data:
377+
schema:
378+
$ref: '#/components/schemas/UploadFileRequest'
379+
responses:
380+
'200':
381+
description: 上传成功
382+
345383
/data-management/dataset-types:
346384
get:
347385
operationId: getDatasetTypes
@@ -548,9 +586,59 @@ components:
548586
description: 标签列表
549587
status:
550588
type: string
551-
enum: [ACTIVE, INACTIVE]
589+
enum: [DRAFT, ACTIVE, PROCESSING, ARCHIVED, PUBLISHED, DEPRECATED]
552590
description: 数据集状态
553591

592+
UploadFilesPreRequest:
593+
type: object
594+
description: 切片上传预上传请求
595+
properties:
596+
hasArchive:
597+
type: boolean
598+
description: 是否为压缩包上传
599+
default: false
600+
totalFileNum:
601+
type: integer
602+
format: int32
603+
minimum: 1
604+
description: 总文件数量
605+
totalSize:
606+
type: integer
607+
format: int64
608+
description: 总文件大小(字节)
609+
required: [ totalFileNum ]
610+
611+
UploadFileRequest:
612+
type: object
613+
description: 分片上传请求
614+
properties:
615+
reqId:
616+
type: string
617+
description: 预上传返回的请求ID
618+
fileNo:
619+
type: integer
620+
format: int32
621+
description: 文件编号(批量中的第几个)
622+
fileName:
623+
type: string
624+
description: 文件名称
625+
totalChunkNum:
626+
type: integer
627+
format: int32
628+
description: 文件总分片数量
629+
chunkNo:
630+
type: integer
631+
format: int32
632+
description: 当前分片编号(从1开始)
633+
file:
634+
type: string
635+
format: binary
636+
description: 分片二进制内容
637+
checkSumHex:
638+
type: string
639+
description: 分片校验和(十六进制)
640+
required: [ reqId, fileNo, fileName, totalChunkNum, chunkNo, file ]
641+
554642
DatasetTypeResponse:
555643
type: object
556644
properties:

0 commit comments

Comments
 (0)