PhoenixStormJr commited on
Commit
f864e9e
·
verified ·
1 Parent(s): 19519c5

Upload folder using huggingface_hub

Browse files
.github/workflows/docker.yml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Build And Push Docker Image
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ # Sequence of patterns matched against refs/tags
7
+ tags:
8
+ - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ packages: write
15
+ contents: read
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set time zone
19
+ uses: szenius/set-timezone@v1.0
20
+ with:
21
+ timezoneLinux: "Asia/Shanghai"
22
+ timezoneMacos: "Asia/Shanghai"
23
+ timezoneWindows: "China Standard Time"
24
+
25
+ # # 如果有 dockerhub 账户,可以在github的secrets中配置下面两个,然后取消下面注释的这几行,并在meta步骤的images增加一行 ${{ github.repository }}
26
+ # - name: Login to DockerHub
27
+ # uses: docker/login-action@v1
28
+ # with:
29
+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
30
+ # password: ${{ secrets.DOCKERHUB_TOKEN }}
31
+
32
+ - name: Login to GHCR
33
+ uses: docker/login-action@v2
34
+ with:
35
+ registry: ghcr.io
36
+ username: ${{ github.repository_owner }}
37
+ password: ${{ secrets.GITHUB_TOKEN }}
38
+
39
+ - name: Extract metadata (tags, labels) for Docker
40
+ id: meta
41
+ uses: docker/metadata-action@v4
42
+ with:
43
+ images: |
44
+ ghcr.io/${{ github.repository }}
45
+ # generate Docker tags based on the following events/attributes
46
+ # nightly, master, pr-2, 1.2.3, 1.2, 1
47
+ tags: |
48
+ type=schedule,pattern=nightly
49
+ type=edge
50
+ type=ref,event=branch
51
+ type=ref,event=pr
52
+ type=semver,pattern={{version}}
53
+ type=semver,pattern={{major}}.{{minor}}
54
+ type=semver,pattern={{major}}
55
+
56
+ - name: Set up QEMU
57
+ uses: docker/setup-qemu-action@v2
58
+
59
+ - name: Set up Docker Buildx
60
+ uses: docker/setup-buildx-action@v2
61
+
62
+ - name: Build and push
63
+ id: docker_build
64
+ uses: docker/build-push-action@v4
65
+ with:
66
+ context: .
67
+ platforms: linux/amd64,linux/arm64
68
+ push: true
69
+ tags: ${{ steps.meta.outputs.tags }}
70
+ labels: ${{ steps.meta.outputs.labels }}
.github/workflows/genlocale.yml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: genlocale
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ golangci:
8
+ name: genlocale
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check out
12
+ uses: actions/checkout@master
13
+
14
+ - name: Run locale generation
15
+ run: |
16
+ python3 extract_locale.py
17
+ cd i18n && python3 locale_diff.py
18
+
19
+ - name: Commit back
20
+ if: ${{ !github.head_ref }}
21
+ continue-on-error: true
22
+ run: |
23
+ git config --local user.name 'github-actions[bot]'
24
+ git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
25
+ git add --all
26
+ git commit -m "🎨 同步 locale"
27
+
28
+ - name: Create Pull Request
29
+ if: ${{ !github.head_ref }}
30
+ continue-on-error: true
31
+ uses: peter-evans/create-pull-request@v4
32
+
.github/workflows/pull_format.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: pull format
2
+
3
+ on: [pull_request]
4
+
5
+ permissions:
6
+ contents: write
7
+ jobs:
8
+ pull_format:
9
+ runs-on: ubuntu-latest
10
+ continue-on-error: true
11
+ steps:
12
+ - name: checkout
13
+ continue-on-error: true
14
+ uses: actions/checkout@v3
15
+ with:
16
+ ref: ${{ github.head_ref }}
17
+ fetch-depth: 0
18
+
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v4
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install Black
26
+ run: pip install black
27
+
28
+ - name: Run Black
29
+ # run: black $(git ls-files '*.py')
30
+ run: black .
31
+
32
+ - name: Commit Back
33
+ uses: stefanzweifel/git-auto-commit-action@v4
34
+ with:
35
+ commit_message: Apply Code Formatter Change
.github/workflows/push_format.yml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: push format
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+ jobs:
12
+ push_format:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ with:
17
+ ref: ${{github.ref_name}}
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install Black
25
+ run: pip install black
26
+
27
+ - name: Run Black
28
+ # run: black $(git ls-files '*.py')
29
+ run: black .
30
+
31
+ - name: Commit Back
32
+ continue-on-error: true
33
+ id: commitback
34
+ run: |
35
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
36
+ git config --local user.name "github-actions[bot]"
37
+ git add --all
38
+ git commit -m "Format code"
39
+
40
+ - name: Create Pull Request
41
+ if: steps.commitback.outcome == 'success'
42
+ continue-on-error: true
43
+ uses: peter-evans/create-pull-request@v4
44
+ with:
45
+ body: Apply Code Formatter Change
46
+ commit-message: Automatic code format
.github/workflows/unitest.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: unitest
2
+ on: [ push, pull_request ]
3
+ jobs:
4
+ build:
5
+ runs-on: ${{ matrix.os }}
6
+ strategy:
7
+ matrix:
8
+ python-version: ["3.8", "3.9", "3.10"]
9
+ os: [ubuntu-latest]
10
+ fail-fast: false
11
+
12
+ steps:
13
+ - uses: actions/checkout@master
14
+ - name: Set up Python ${{ matrix.python-version }}
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ - name: Install dependencies
19
+ run: |
20
+ sudo apt update
21
+ sudo apt -y install ffmpeg
22
+ sudo apt -y install -qq aria2
23
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d ./ -o hubert_base.pt
24
+ python -m pip install --upgrade pip
25
+ python -m pip install --upgrade setuptools
26
+ python -m pip install --upgrade wheel
27
+ pip install torch torchvision torchaudio
28
+ pip install -r requirements.txt
29
+ - name: Test step 1 & 2
30
+ run: |
31
+ mkdir -p logs/mi-test
32
+ touch logs/mi-test/preprocess.log
33
+ python trainset_preprocess_pipeline_print.py logs/mute/0_gt_wavs 48000 8 logs/mi-test True
34
+ touch logs/mi-test/extract_f0_feature.log
35
+ python extract_f0_print.py logs/mi-test $(nproc) pm
36
+ python extract_feature_print.py cpu 1 0 0 logs/mi-test v1