mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-12-16 09:16:59 +08:00
This commit migrates the project from using NVIDIA CUDA to Intel XPU for GPU acceleration, based on the PyTorch 2.9 release. Key changes include: - Replaced `torch.cuda` with `torch.xpu` for device checks, memory management, and distributed training. - Updated device strings from "cuda" to "xpu" across the codebase. - Switched the distributed training backend from "nccl" to "ccl" for Intel GPUs. - Disabled custom CUDA kernels in the `BigVGAN` module by setting `use_cuda_kernel=False`. - Updated `requirements.txt` to include `torch==2.9` and `intel-extension-for-pytorch`. - Modified CI/CD pipelines and build scripts to remove CUDA dependencies and build for an XPU target.
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: Build and Publish Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate-meta:
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
tag: ${{ steps.meta.outputs.tag }}
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Generate Tag
|
|
id: meta
|
|
run: |
|
|
DATE=$(date +'%Y%m%d')
|
|
COMMIT=$(git rev-parse --short=6 HEAD)
|
|
echo "tag=${DATE}-${COMMIT}" >> $GITHUB_OUTPUT
|
|
build-and-publish:
|
|
needs: generate-meta
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- lite: true
|
|
torch_base: lite
|
|
tag_prefix: xpu-lite
|
|
- lite: false
|
|
torch_base: full
|
|
tag_prefix: xpu
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: |
|
|
LITE=${{ matrix.lite }}
|
|
TORCH_BASE=${{ matrix.torch_base }}
|
|
WORKFLOW=true
|
|
tags: |
|
|
xxxxrt666/gpt-sovits:${{ matrix.tag_prefix }}-${{ needs.generate-meta.outputs.tag }}
|
|
xxxxrt666/gpt-sovits:latest-${{ matrix.tag_prefix }}
|
|
|