feat: label-studio构建脚本 (#198)

* feat: label-studio构建脚本

* feat: label-studio构建脚本

* feat: label-studio构建脚本

* feat: label-studio安装脚本
This commit is contained in:
hhhhsc701
2025-12-25 11:44:05 +08:00
committed by GitHub
parent 1c507ac98a
commit 7e842c7cd5
10 changed files with 235 additions and 193 deletions

View File

@@ -5,6 +5,7 @@ on:
branches: [ "main" ]
paths:
- 'backend/**'
- '!backend/api-gateway/**'
- 'scripts/images/backend/**'
- '.github/workflows/docker-image-backend.yml'
- '.github/workflows/docker-images-reusable.yml'
@@ -12,6 +13,7 @@ on:
branches: [ "main" ]
paths:
- 'backend/**'
- '!backend/api-gateway/**'
- 'scripts/images/backend/**'
- '.github/workflows/docker-image-backend.yml'
- '.github/workflows/docker-images-reusable.yml'

View File

@@ -4,14 +4,14 @@ on:
push:
branches: [ "main" ]
paths:
- 'backend/**'
- 'backend/api-gateway/**'
- 'scripts/images/gateway/**'
- '.github/workflows/docker-image-gateway.yml'
- '.github/workflows/docker-images-reusable.yml'
pull_request:
branches: [ "main" ]
paths:
- 'backend/**'
- 'backend/api-gateway/**'
- 'scripts/images/gateway/**'
- '.github/workflows/docker-image-gateway.yml'
- '.github/workflows/docker-images-reusable.yml'

View File

@@ -0,0 +1,28 @@
name: Label Studio Docker Image CI
on:
push:
branches: [ "main" ]
paths:
- 'scripts/images/label-studio/**'
- '.github/workflows/docker-image-label-studio.yml'
- '.github/workflows/docker-images-reusable.yml'
pull_request:
branches: [ "main" ]
paths:
- 'scripts/images/label-studio/**'
- '.github/workflows/docker-image-label-studio.yml'
- '.github/workflows/docker-images-reusable.yml'
workflow_dispatch:
workflow_call:
jobs:
call-docker-build:
name: Build and Push Label Studio Docker Image
uses: ./.github/workflows/docker-images-reusable.yml
permissions:
contents: read
packages: write
with:
service_name: label-studio
build_dir: .

View File

@@ -1,110 +0,0 @@
name: DataMate Package
on:
workflow_dispatch:
inputs:
milvus:
type: boolean
description: 是否打包milvus
required: false
default: true
deer-flow:
type: boolean
description: 是否打包deer-flow
required: false
default: false
version:
type: string
description: 版本号
required: false
default: 1.0.0
jobs:
package-all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clone DataMate-Deploy
uses: GuillaumeFalourd/clone-github-repo-action@v2.3
with:
owner: ModelEngine-Group
repository: 'DataMate-Deploy'
access-token: ${{ secrets.ACCESS_TOKEN }}
- name: Copy tools
run: |
cp -r DataMate-Deploy/tools tools
- name: DataMate Package
run: |
mkdir helm
cp -r deployment/helm/datamate helm/datamate
sed -i "s#^\(\s*repository:\s*\).*#\1\"\"#" helm/datamate/values.yaml
sed -i "s#^\(\s*type:\s*\).*#\1ClusterIP#" helm/datamate/values.yaml
- name: DeerFlow Package
if: inputs.deer-flow == true
run: |
cp runtime/deer-flow/.env deployment/helm/deer-flow/charts/public/.env
cp runtime/deer-flow/conf.yaml deployment/helm/deer-flow/charts/public/conf.yaml
cp -r deployment/helm/deer-flow helm/deer-flow
- name: Milvus Package
if: inputs.milvus == true
run: |
cp -r deployment/helm/milvus helm/milvus
sed -i "s#^\(\s*workload:\s*\).*#\1deployment#" helm/milvus/values.yaml
- name: Download DataMate Image
run: |
mkdir -p images/datamate
LOWERCASE_REPO=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
services=("runtime" "backend" "frontend" "database" "backend-python" "gateway")
for service in "${services[@]}"; do
docker pull ghcr.io/$LOWERCASE_REPO/datamate-$service:latest --platform arm64
docker tag ghcr.io/$LOWERCASE_REPO/datamate-$service:latest datamate-$service:latest
docker save -o images/datamate/datamate-$service.tar datamate-$service:latest
docker rmi ghcr.io/$LOWERCASE_REPO/datamate-$service:latest datamate-$service:latest
done
docker pull quay.io/kuberay/operator:v1.4.2 --platform arm64
docker save -o images/datamate/kuberay-operator.tar quay.io/kuberay/operator:v1.4.2
docker rmi quay.io/kuberay/operator:v1.4.2
- name: Download DeerFlow Image
if: inputs.deer-flow == true
run: |
mkdir -p images/deer-flow
LOWERCASE_REPO=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
services=("backend" "frontend")
for service in "${services[@]}"; do
docker pull ghcr.io/$LOWERCASE_REPO/deer-flow-$service:latest --platform arm64
docker tag ghcr.io/$LOWERCASE_REPO/deer-flow-$service:latest deer-flow-$service:latest
docker save -o images/deer-flow/deer-flow-$service.tar deer-flow-$service:latest
docekr rmi ghcr.io/$LOWERCASE_REPO/deer-flow-$service:latest deer-flow-$service:latest
done
- name: Download Milvus Image
if: inputs.milvus == true
run: |
mkdir -p images/milvus
docker pull milvusdb/milvus:v2.6.5 --platform arm64
docker save -o images/milvus/milvus.tar milvusdb/milvus:v2.6.5
docker rmi milvusdb/milvus:v2.6.5
docker pull minio/minio:RELEASE.2024-12-18T13-15-44Z --platform arm64
docker save -o images/milvus/minio.tar minio/minio:RELEASE.2024-12-18T13-15-44Z
docker rmi minio/minio:RELEASE.2024-12-18T13-15-44Z
docker pull milvusdb/etcd:3.5.18-r1 --platform arm64
docker save -o images/milvus/etcd.tar milvusdb/etcd:3.5.18-r1
docker rmi milvusdb/etcd:3.5.18-r1
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: DataMate_${{ inputs.version }}_Aarch64
include-hidden-files: true
path: |
helm/
images/
tools/

View File

@@ -1,78 +0,0 @@
name: Package All
on:
workflow_dispatch:
jobs:
backend-docker-build:
name: Build and Push Backend Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: backend
frontend-docker-build:
name: Build and Push Frontend Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: frontend
database-docker-build:
name: Build and Push Database Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: database
runtime-docker-build:
name: Build and Push Runtime Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: runtime
backend-python-docker-build:
name: Build and Push Backend Python Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: backend-python
gateway-docker-build:
name: Build and Push Frontend Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: gateway
package-all:
needs:
- backend-docker-build
- frontend-docker-build
- database-docker-build
- backend-python-docker-build
- runtime-docker-build
- gateway-docker-build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Image
uses: actions/download-artifact@v5
with:
path: images
pattern: datamate-*
merge-multiple: true
- name: Package
run: |
cp runtime/deer-flow/.env deployment/docker/deer-flow/.env
cp runtime/deer-flow/conf.yaml deployment/docker/deer-flow/conf.yaml
cp runtime/deer-flow/.env deployment/helm/deer-flow/charts/public/.env
cp runtime/deer-flow/conf.yaml deployment/helm/deer-flow/charts/public/conf.yaml
tar -cvf datamate.tar deployment/ images
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: DataMate
include-hidden-files: true
path: |
deployment/
images/