mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-09-25 13:49:59 +08:00
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
name: Build and Publish Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate-meta:
|
|
runs-on: ubuntu-latest
|
|
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-push:
|
|
needs: generate-meta
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- cuda_version: 12.4
|
|
use_fasterwhisper: false
|
|
tag_prefix: lite-cu124
|
|
- cuda_version: 12.4
|
|
use_fasterwhisper: true
|
|
tag_prefix: cu124
|
|
- cuda_version: 12.8
|
|
use_fasterwhisper: false
|
|
tag_prefix: lite-cu128
|
|
- cuda_version: 12.8
|
|
use_fasterwhisper: true
|
|
tag_prefix: cu128
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Free up disk space
|
|
run: |
|
|
echo "Before cleanup:"
|
|
df -h
|
|
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
|
sudo apt clean
|
|
echo "After cleanup:"
|
|
df -h
|
|
sudo du -hxd1 / | sort -hr | head -n 20
|
|
du -h --max-depth=1 /usr
|
|
du -h --max-depth=1 /opt
|
|
du -h --max-depth=1 /home
|
|
|
|
- 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
|
|
build-args: |
|
|
USE_FUNASR=true
|
|
USE_FASTERWHISPER=${{ matrix.use_fasterwhisper }}
|
|
CUDA_VERSION=${{ matrix.cuda_version }}
|
|
WGET_CMD=wget -nv --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404
|
|
SKIP_CHECK=true
|
|
tags: |
|
|
xxxxrt666/gpt-sovits:${{ matrix.tag_prefix }}-${{ needs.generate-meta.outputs.tag }}
|
|
xxxxrt666/gpt-sovits:latest-${{ matrix.tag_prefix }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max |