Skip to content

Commit 7e842c7

Browse files
authored
feat: label-studio构建脚本 (#198)
* feat: label-studio构建脚本 * feat: label-studio构建脚本 * feat: label-studio构建脚本 * feat: label-studio安装脚本
1 parent 1c507ac commit 7e842c7

File tree

10 files changed

+235
-193
lines changed

10 files changed

+235
-193
lines changed

.github/workflows/docker-image-backend.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
branches: [ "main" ]
66
paths:
77
- 'backend/**'
8+
- '!backend/api-gateway/**'
89
- 'scripts/images/backend/**'
910
- '.github/workflows/docker-image-backend.yml'
1011
- '.github/workflows/docker-images-reusable.yml'
1112
pull_request:
1213
branches: [ "main" ]
1314
paths:
1415
- 'backend/**'
16+
- '!backend/api-gateway/**'
1517
- 'scripts/images/backend/**'
1618
- '.github/workflows/docker-image-backend.yml'
1719
- '.github/workflows/docker-images-reusable.yml'

.github/workflows/docker-image-gateway.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
push:
55
branches: [ "main" ]
66
paths:
7-
- 'backend/**'
7+
- 'backend/api-gateway/**'
88
- 'scripts/images/gateway/**'
99
- '.github/workflows/docker-image-gateway.yml'
1010
- '.github/workflows/docker-images-reusable.yml'
1111
pull_request:
1212
branches: [ "main" ]
1313
paths:
14-
- 'backend/**'
14+
- 'backend/api-gateway/**'
1515
- 'scripts/images/gateway/**'
1616
- '.github/workflows/docker-image-gateway.yml'
1717
- '.github/workflows/docker-images-reusable.yml'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Label Studio Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'scripts/images/label-studio/**'
8+
- '.github/workflows/docker-image-label-studio.yml'
9+
- '.github/workflows/docker-images-reusable.yml'
10+
pull_request:
11+
branches: [ "main" ]
12+
paths:
13+
- 'scripts/images/label-studio/**'
14+
- '.github/workflows/docker-image-label-studio.yml'
15+
- '.github/workflows/docker-images-reusable.yml'
16+
workflow_dispatch:
17+
workflow_call:
18+
19+
jobs:
20+
call-docker-build:
21+
name: Build and Push Label Studio Docker Image
22+
uses: ./.github/workflows/docker-images-reusable.yml
23+
permissions:
24+
contents: read
25+
packages: write
26+
with:
27+
service_name: label-studio
28+
build_dir: .

.github/workflows/enterprise-package.yml

Lines changed: 0 additions & 110 deletions
This file was deleted.

.github/workflows/package.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ endef
155155
# ========== Build Targets ==========
156156

157157
# Valid build targets
158-
VALID_BUILD_TARGETS := backend database frontend runtime backend-python deer-flow mineru mineru-npu gateway
158+
VALID_BUILD_TARGETS := backend database frontend runtime backend-python deer-flow mineru mineru-npu gateway label-studio
159159

160160
# Generic docker build target with service name as parameter
161161
# Automatically prefixes image names with "datamate-" unless it's deer-flow
@@ -231,7 +231,6 @@ else
231231
fi
232232
@$(MAKE) label-studio-$(INSTALLER)-uninstall DELETE_VOLUMES_CHOICE=$$DELETE_VOLUMES_CHOICE; \
233233
$(MAKE) milvus-$(INSTALLER)-uninstall DELETE_VOLUMES_CHOICE=$$DELETE_VOLUMES_CHOICE; \
234-
$(MAKE) datamate-$(INSTALLER)-uninstall DELETE_VOLUMES_CHOICE=$$DELETE_VOLUMES_CHOICE; \
235234
$(MAKE) deer-flow-$(INSTALLER)-uninstall DELETE_VOLUMES_CHOICE=$$DELETE_VOLUMES_CHOICE; \
236235
$(MAKE) datamate-$(INSTALLER)-uninstall DELETE_VOLUMES_CHOICE=$$DELETE_VOLUMES_CHOICE
237236
endif
@@ -321,7 +320,9 @@ VALID_K8S_TARGETS := mineru datamate deer-flow milvus label-studio
321320
done; \
322321
exit 1; \
323322
fi
324-
@if [ "$*" = "mineru" ]; then \
323+
@if [ "$*" = "label-studio" ]; then \
324+
helm upgrade label-studio deployment/helm/label-studio/ -n $(NAMESPACE) --install; \
325+
elif [ "$*" = "mineru" ]; then \
325326
kubectl apply -f deployment/kubernetes/mineru/deploy.yaml -n $(NAMESPACE); \
326327
elif [ "$*" = "datamate" ]; then \
327328
helm upgrade datamate deployment/helm/datamate/ -n $(NAMESPACE) --install --set global.image.repository=$(REGISTRY); \

deployment/helm/label-studio/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ spec:
2121
spec:
2222
containers:
2323
- name: label-studio
24+
{{- if .Values.global.imageRegistry }}
25+
image: "{{ .Values.global.imageRegistry | trimSuffix "/" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
26+
{{- else }}
2427
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
28+
{{- end }}
2529
imagePullPolicy: {{ .Values.image.pullPolicy }}
2630
args: ["label-studio-uwsgi"]
2731
env:

deployment/helm/label-studio/templates/postgres.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ spec:
3131
spec:
3232
containers:
3333
- name: postgres
34+
{{- if .Values.global.imageRegistry }}
35+
image: "{{ .Values.global.imageRegistry | trimSuffix "/" }}/{{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
36+
{{- else }}
3437
image: "{{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
38+
{{- end }}
3539
imagePullPolicy: {{ .Values.postgres.image.pullPolicy }}
3640
env:
3741
- name: POSTGRES_HOST_AUTH_METHOD

deployment/helm/label-studio/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ fullnameOverride: label-studio
44

55
replicaCount: 1
66

7+
global:
8+
imageRegistry: ""
9+
710
image:
811
repository: heartexlabs/label-studio
912
tag: "latest"

0 commit comments

Comments
 (0)