diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index de8f4a04b..ad77a8055 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,6 +15,8 @@ on: jobs: build: runs-on: ubuntu-latest + env: + BUILDX_NO_DEFAULT_ATTESTATIONS: 1 steps: - name: Checkout repository @@ -50,3 +52,4 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} + platforms: linux/amd64,linux/arm64 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f6d8c8c0..39d7f594b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,10 +32,15 @@ csghub-build: IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG DOCKER_HOST: "tcp://docker:2375" DOCKER_TLS_CERTDIR: "" - script: + BUILDX_NO_DEFAULT_ATTESTATIONS: 1 + before_script: + - apk add --no-cache --virtual .build-deps curl + - mkdir -p ~/.docker/cli-plugins + - curl -SL https://github.com/docker/buildx/releases/download/v0.17.1/buildx-v0.17.1.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx + - chmod +x ~/.docker/cli-plugins/docker-buildx - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN - - docker build -t $IMAGE_TAG . - - docker push $IMAGE_TAG + script: + - docker buildx build --platform linux/amd64,linux/arm64 -t ${IMAGE_TAG} --push . csghub-deploy: stage: deploy diff --git a/Dockerfile b/Dockerfile index 282d182f6..8db1ba8fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,19 @@ -FROM opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/go-node AS build +FROM --platform=$BUILDPLATFORM opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/go-node AS builder +ARG TARGETPLATFORM +ARG BUILDPLATFORM + RUN mkdir /myapp WORKDIR /myapp ADD . /myapp +ENV CGO_ENABLED=0 RUN go mod tidy RUN cd frontend && yarn install && yarn build -RUN go build -o csghub-portal ./cmd/csghub-portal +RUN GOOS=$(echo ${TARGETPLATFORM} | cut -f1 -d '/') \ + GOARCH=$(echo ${TARGETPLATFORM} | cut -f2 -d '/') \ + go build -o csghub-portal ./cmd/csghub-portal FROM bitnami/minideb:latest RUN apt update && apt install -y ca-certificates && update-ca-certificates WORKDIR /myapp -COPY --from=build /myapp/csghub-portal /myapp/csghub-portal +COPY --from=builder /myapp/csghub-portal /myapp/csghub-portal \ No newline at end of file diff --git a/deploy/all_in_one/README.md b/deploy/all_in_one/README.md index 3e81fadb1..7dc947ac0 100644 --- a/deploy/all_in_one/README.md +++ b/deploy/all_in_one/README.md @@ -17,7 +17,7 @@ * registry **注意:** -1. CSGHhub v0.4.0支持了应用空间(即space)功能,v0.7.0支持了模型微调、推理等功能。而应用空间,模型微调以及推理等都需要Kubernetes以及其相关Knative组件的配置,基于compose部署不包括Kubernetes平台以及相关依赖Knative组件部署(这部分安装配置详见[Knative安装配置](https://opencsg.com/docs/csghub/101/helm/installation)),如果没有做对接Kubernetes平台,这里部署的CSGHub实例将`不包含应用空间,模型微调和推理`功能。 +1. CSGHub v0.4.0支持了应用空间(即space)功能,v0.7.0支持了模型微调、推理等功能。而应用空间,模型微调以及推理等都需要Kubernetes以及其相关Knative组件的配置,基于compose部署不包括Kubernetes平台以及相关依赖Knative组件部署(这部分安装配置详见[Knative安装配置](https://opencsg.com/docs/csghub/101/helm/installation)),如果没有做对接Kubernetes平台,这里部署的CSGHub实例将`不包含应用空间,模型微调和推理`功能。 1. 可以使用CSGHub的[helm chart](https://github.com/OpenCSGs/CSGHub-helm)来安装完整版CSGHub实例,具体安装步骤可参见[CSGHub Helm Chart安装文档](https://opencsg.com/docs/csghub/101/helm/summary) diff --git a/docs/setup.md b/docs/setup.md index 5f4d8ec35..8eb857c63 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -117,7 +117,7 @@ go mod tidy Air 是一个允许 Go 应用程序实时重载的工具。使用以下命令安装: ```shell -go install github.com/cosmtrek/air@latest +go install github.com/air-verse/air@latest ``` ### 获取前端依赖项 diff --git a/docs/setup_en.md b/docs/setup_en.md index a009145b4..f72a91953 100644 --- a/docs/setup_en.md +++ b/docs/setup_en.md @@ -121,7 +121,7 @@ go mod tidy Air is a tool that allows live reloading of Go applications. Install it using the following command: ```shell -go install github.com/cosmtrek/air@latest +go install github.com/air-verse/air@latest ``` ### Getting Frontend Dependencies diff --git a/frontend/package.json b/frontend/package.json index 0f097b4aa..6d1c2606c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,7 +40,7 @@ "@vitejs/plugin-vue": "^5.1.2", "autoprefixer": "^10.4.20", "postcss": "^8.4.41", - "tailwindcss": "^3.4.10", - "vite": "^5.4.0" + "tailwindcss": "^3.4.13", + "vite": "^5.4.6" } } diff --git a/frontend/src/assets/stylesheets/element-plus/_variables.css b/frontend/src/assets/stylesheets/element-plus/_variables.css index f1f4456b7..179d4643e 100644 --- a/frontend/src/assets/stylesheets/element-plus/_variables.css +++ b/frontend/src/assets/stylesheets/element-plus/_variables.css @@ -1,5 +1,5 @@ :root { - --Base-White: #FFF; + --Base-White: #FFFFFF; --Gray-25: #FCFCFD; --Gray-50: #F9FAFB; diff --git a/frontend/src/components/OnPremiseFooter.vue b/frontend/src/components/OnPremiseFooter.vue index ea8105914..072b702fe 100644 --- a/frontend/src/components/OnPremiseFooter.vue +++ b/frontend/src/components/OnPremiseFooter.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/application_spaces/ApplicationSpaceDetail.vue b/frontend/src/components/application_spaces/ApplicationSpaceDetail.vue index f4733b227..1cb039011 100644 --- a/frontend/src/components/application_spaces/ApplicationSpaceDetail.vue +++ b/frontend/src/components/application_spaces/ApplicationSpaceDetail.vue @@ -1,5 +1,5 @@