Revert "由于PySimpleGUI作者故意移除免费的旧版本,改用PySimpleGUI-4-foss"

This commit is contained in:
天涯古巷
2025-04-25 11:03:16 +08:00
committed by GitHub
parent 991294c00f
commit 53baf28326
235 changed files with 59573 additions and 801 deletions

View File

@@ -1,87 +0,0 @@
name: Docker Build and Push
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- type: cuda
version: "11.8"
- type: cuda
version: "12.6"
- type: cuda
version: "12.8"
- type: directml
version: "latest"
steps:
- name: Show system
run: |
echo -e "Total CPU cores\t: $(nproc)"
cat /proc/cpuinfo | grep 'model name'
ulimit -a
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
swap-size-mb: 512
temp-reserve-mb: 1024
root-reserve-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: 检出代码
uses: actions/checkout@v4
- name: 读取 VERSION
id: version
run: |
VERSION=$(sed -n 's/^VERSION = "\(.*\)"/\1/p' backend/config.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: 设置 Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 登录到 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 提取元数据
id: meta
uses: docker/metadata-action@v4
with:
images: eritpchy/video-subtitle-remover
tags: |
type=raw,value=${{ env.VERSION }}-${{ matrix.type }}${{ matrix.type == 'cuda' && matrix.version || '' }}
- name: 构建并推送
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
${{ matrix.type == 'cuda' && format('CUDA_VERSION={0}', matrix.version) || '' }}
${{ matrix.type == 'directml' && 'USE_DIRECTML=1' || '' }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: eritpchy/video-subtitle-remover

View File

@@ -1,93 +0,0 @@
name: Build Windows CUDA 11.8
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: false
permissions:
contents: write
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: 读取 VERSION
id: version
run: |
VERSION=$(sed -n 's/^VERSION = "\(.*\)"/\1/p' backend/config.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
# - name: 检查 tag 是否已存在
# run: |
# TAG_NAME="${VERSION}"
# if git ls-remote --tags origin | grep -q "refs/tags/$TAG_NAME"; then
# echo "Tag $TAG_NAME 已存在,发布中止"
# exit 1
# fi
# shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- run: pip install paddlepaddle==3.0.0
- run: pip install -r requirements.txt
- run: pip freeze > requirements.txt
- run: pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu118
- run: pip install QPT==1.0b8 setuptools
- name: 获取 site-packages 路径
shell: bash
run: |
SITE_PACKAGES=$(python -c "import site, os; print(os.path.join(site.getsitepackages()[0], 'Lib', 'site-packages'))")
SITE_PACKAGES_UNIX=$(cygpath -u "$SITE_PACKAGES")
echo "site-packages路径: $SITE_PACKAGES"
echo "site-packages UNIX路径: $SITE_PACKAGES_UNIX"
echo "SITE_PACKAGES_UNIX=$SITE_PACKAGES_UNIX" >> $GITHUB_ENV
echo "SITE_PACKAGES=$SITE_PACKAGES" >> $GITHUB_ENV
- name: 修复QPT内部错误
run: sed -i '98c\ try:\n dep = pkg.requires()\n except TypeError:\n continue' ${SITE_PACKAGES_UNIX}/qpt/kernel/qpackage.py
shell: bash
- name: Start SSH via tmate
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
uses: mxschmitt/action-tmate@v3
- run: |
python backend/tools/makedist.py --cuda 11.8 && \
mv ../vsr_out ./vsr_out
env:
QPT_Action: "True"
shell: bash
- name: 上传 Debug 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8-debug
path: vsr_out/Debug/
- name: 上传 Release 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8-release
path: vsr_out/Release/
- name: 打包 Release 文件夹
run: |
cd vsr_out/Release
7z a -t7z -mx=9 -m0=LZMA2 -ms=on -mfb=64 -md=32m -mmt=on -v2000m vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z * && \
# 检测是否只有一个分卷
if [ -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z.001 ] && [ ! -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z.002 ]; then \
mv vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z.001 vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z; fi
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
name: 硬字幕提取器 ${{ env.VERSION }}
files: |
vsr_out/Release/vsr-v${{ env.VERSION }}-windows-nvidia-cuda-11.8.7z*

View File

@@ -1,93 +0,0 @@
name: Build Windows CUDA 12.6
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: false
permissions:
contents: write
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: 读取 VERSION
id: version
run: |
VERSION=$(sed -n 's/^VERSION = "\(.*\)"/\1/p' backend/config.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
# - name: 检查 tag 是否已存在
# run: |
# TAG_NAME="${VERSION}"
# if git ls-remote --tags origin | grep -q "refs/tags/$TAG_NAME"; then
# echo "Tag $TAG_NAME 已存在,发布中止"
# exit 1
# fi
# shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- run: pip install paddlepaddle==3.0.0
- run: pip install -r requirements.txt
- run: pip freeze > requirements.txt
- run: pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu126
- run: pip install QPT==1.0b8 setuptools
- name: 获取 site-packages 路径
shell: bash
run: |
SITE_PACKAGES=$(python -c "import site, os; print(os.path.join(site.getsitepackages()[0], 'Lib', 'site-packages'))")
SITE_PACKAGES_UNIX=$(cygpath -u "$SITE_PACKAGES")
echo "site-packages路径: $SITE_PACKAGES"
echo "site-packages UNIX路径: $SITE_PACKAGES_UNIX"
echo "SITE_PACKAGES_UNIX=$SITE_PACKAGES_UNIX" >> $GITHUB_ENV
echo "SITE_PACKAGES=$SITE_PACKAGES" >> $GITHUB_ENV
- name: 修复QPT内部错误
run: sed -i '98c\ try:\n dep = pkg.requires()\n except TypeError:\n continue' ${SITE_PACKAGES_UNIX}/qpt/kernel/qpackage.py
shell: bash
- name: Start SSH via tmate
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
uses: mxschmitt/action-tmate@v3
- run: |
python backend/tools/makedist.py --cuda 12.6 && \
mv ../vsr_out ./vsr_out
env:
QPT_Action: "True"
shell: bash
- name: 上传 Debug 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6-debug
path: vsr_out/Debug/
- name: 上传 Release 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6-release
path: vsr_out/Release/
- name: 打包 Release 文件夹
run: |
cd vsr_out/Release
7z a -t7z -mx=9 -m0=LZMA2 -ms=on -mfb=64 -md=32m -mmt=on -v2000m vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z * && \
# 检测是否只有一个分卷
if [ -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z.001 ] && [ ! -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z.002 ]; then \
mv vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z.001 vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z; fi
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
name: 硬字幕提取器 ${{ env.VERSION }}
files: |
vsr_out/Release/vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.6.7z*

View File

@@ -1,93 +0,0 @@
name: Build Windows CUDA 12.8
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: false
permissions:
contents: write
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: 读取 VERSION
id: version
run: |
VERSION=$(sed -n 's/^VERSION = "\(.*\)"/\1/p' backend/config.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
# - name: 检查 tag 是否已存在
# run: |
# TAG_NAME="${VERSION}"
# if git ls-remote --tags origin | grep -q "refs/tags/$TAG_NAME"; then
# echo "Tag $TAG_NAME 已存在,发布中止"
# exit 1
# fi
# shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- run: pip install paddlepaddle==3.0.0
- run: pip install -r requirements.txt
- run: pip freeze > requirements.txt
- run: pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
- run: pip install QPT==1.0b8 setuptools
- name: 获取 site-packages 路径
shell: bash
run: |
SITE_PACKAGES=$(python -c "import site, os; print(os.path.join(site.getsitepackages()[0], 'Lib', 'site-packages'))")
SITE_PACKAGES_UNIX=$(cygpath -u "$SITE_PACKAGES")
echo "site-packages路径: $SITE_PACKAGES"
echo "site-packages UNIX路径: $SITE_PACKAGES_UNIX"
echo "SITE_PACKAGES_UNIX=$SITE_PACKAGES_UNIX" >> $GITHUB_ENV
echo "SITE_PACKAGES=$SITE_PACKAGES" >> $GITHUB_ENV
- name: 修复QPT内部错误
run: sed -i '98c\ try:\n dep = pkg.requires()\n except TypeError:\n continue' ${SITE_PACKAGES_UNIX}/qpt/kernel/qpackage.py
shell: bash
- name: Start SSH via tmate
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
uses: mxschmitt/action-tmate@v3
- run: |
python backend/tools/makedist.py --cuda 12.8 && \
mv ../vsr_out ./vsr_out
env:
QPT_Action: "True"
shell: bash
- name: 上传 Debug 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8-debug
path: vsr_out/Debug/
- name: 上传 Release 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8-release
path: vsr_out/Release/
- name: 打包 Release 文件夹
run: |
cd vsr_out/Release
7z a -t7z -mx=9 -m0=LZMA2 -ms=on -mfb=64 -md=32m -mmt=on -v2000m vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z * && \
# 检测是否只有一个分卷
if [ -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z.001 ] && [ ! -f vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z.002 ]; then \
mv vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z.001 vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z; fi
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
name: 硬字幕提取器 ${{ env.VERSION }}
files: |
vsr_out/Release/vsr-v${{ env.VERSION }}-windows-nvidia-cuda-12.8.7z*

View File

@@ -1,93 +0,0 @@
name: Build Windows DirectML
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: false
permissions:
contents: write
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: 读取 VERSION
id: version
run: |
VERSION=$(sed -n 's/^VERSION = "\(.*\)"/\1/p' backend/config.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
# - name: 检查 tag 是否已存在
# run: |
# TAG_NAME="${VERSION}"
# if git ls-remote --tags origin | grep -q "refs/tags/$TAG_NAME"; then
# echo "Tag $TAG_NAME 已存在,发布中止"
# exit 1
# fi
# shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- run: pip install paddlepaddle==3.0.0
- run: pip install -r requirements.txt
- run: pip freeze > requirements.txt
- run: pip install torch_directml==0.2.5.dev240914
- run: pip install QPT==1.0b8 setuptools
- name: 获取 site-packages 路径
shell: bash
run: |
SITE_PACKAGES=$(python -c "import site, os; print(os.path.join(site.getsitepackages()[0], 'Lib', 'site-packages'))")
SITE_PACKAGES_UNIX=$(cygpath -u "$SITE_PACKAGES")
echo "site-packages路径: $SITE_PACKAGES"
echo "site-packages UNIX路径: $SITE_PACKAGES_UNIX"
echo "SITE_PACKAGES_UNIX=$SITE_PACKAGES_UNIX" >> $GITHUB_ENV
echo "SITE_PACKAGES=$SITE_PACKAGES" >> $GITHUB_ENV
- name: 修复QPT内部错误
run: sed -i '98c\ try:\n dep = pkg.requires()\n except TypeError:\n continue' ${SITE_PACKAGES_UNIX}/qpt/kernel/qpackage.py
shell: bash
- name: Start SSH via tmate
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
uses: mxschmitt/action-tmate@v3
- run: |
python backend/tools/makedist.py --directml && \
mv ../vsr_out ./vsr_out
env:
QPT_Action: "True"
shell: bash
- name: 上传 Debug 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-directml-debug
path: vsr_out/Debug/
- name: 上传 Release 文件夹到 Artifacts
uses: actions/upload-artifact@v4
with:
name: vsr-v${{ env.VERSION }}-windows-directml-release
path: vsr_out/Release/
- name: 打包 Release 文件夹
run: |
cd vsr_out/Release
7z a -t7z -mx=9 -m0=LZMA2 -ms=on -mfb=64 -md=32m -mmt=on -v2000m vsr-v${{ env.VERSION }}-windows-directml.7z * && \
# 检测是否只有一个分卷
if [ -f vsr-v${{ env.VERSION }}-windows-directml.7z.001 ] && [ ! -f vsr-v${{ env.VERSION }}-windows-directml.7z.002 ]; then \
mv vsr-v${{ env.VERSION }}-windows-directml.7z.001 vsr-v${{ env.VERSION }}-windows-directml.7z; fi
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
name: 硬字幕提取器 ${{ env.VERSION }}
files: |
vsr_out/Release/vsr-v${{ env.VERSION }}-windows-directml.7z*