Skip to content

Update CUDA python requirements with onnxruntime 1.19 update #590

Update CUDA python requirements with onnxruntime 1.19 update

Update CUDA python requirements with onnxruntime 1.19 update #590

name: Package exe with PyInstaller
on:
pull_request:
branches: [ master-custom ]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build-all:
strategy:
matrix:
include:
- os: windows-latest
os_suffix: windows-amd64
reqs: cuda
backend: cuda
python-version: '3.11'
- os: windows-latest
os_suffix: windows-amd64
reqs: dml
backend: dml
python-version: '3.11'
- os: macos-13
os_suffix: macos-amd64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: macos-latest
os_suffix: macos-arm64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: cuda
backend: cuda
# Linux CUDA depends on faiss-gpu-cp310
python-version: '3.10'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: rocm
backend: rocm
# onnxruntime-rocm supports only cp310
python-version: '3.10'
runs-on: ${{ matrix.os }}
env:
BACKEND: ${{ matrix.backend }}
steps:
- name: Maximize build space
if: matrix.os == 'ubuntu-20.04'
uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-swapfile: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-android: 'true'
remove-dotnet: 'true'
# remove-large-packages: 'true'
remove-haskell: 'true'
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# architecture: x64
# cache: pip
- name: Installing build dependencies
run: python -m pip install --no-cache-dir --upgrade pip wheel setuptools pyinstaller
- name: Installing project dependencies
run: python -m pip install --no-cache-dir -r requirements-common.txt -r requirements-${{ matrix.reqs }}.txt
working-directory: ./server
- name: Building executable
run: pyinstaller --clean -y --dist ./dist --workpath /tmp MMVCServerSIO.spec
working-directory: ./server
- name: Copy utils
run: cp ./server/{force_gpu_clocks.bat,reset_gpu_clocks.bat} ./server/dist/
shell: bash
if: matrix.os == 'windows-latest' && matrix.backend == 'cuda'
- name: Pack artifact
shell: bash
run: |
if [ "$RUNNER_OS" != "Windows" ]; then
mkdir ./server/.tarballs
tar cf ./server/.tarballs/voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}.tar ./server/dist
rm -rf ./server/dist/*
mv ./server/.tarballs/voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}.tar ./server/dist/
fi
- name: Uploading artifact
uses: actions/upload-artifact@v4
with:
name: voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}
path: ./server/dist