mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 09:05:17 -07:00
Add LLVM installation and exclude unnecessary modules from PyInstaller build
- Install llvm-dev on Ubuntu for llvmlite compilation - Install LLVM via Homebrew on macOS and configure PATH - Exclude matplotlib, IPython, notebook, pytest, tensorboard from bundle to reduce size - Keep --onefile mode with module exclusions to avoid 4GB limit
This commit is contained in:
@@ -36,7 +36,14 @@ jobs:
|
|||||||
if: matrix.platform == 'ubuntu-22.04'
|
if: matrix.platform == 'ubuntu-22.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf llvm-dev
|
||||||
|
|
||||||
|
- name: Install LLVM (macOS)
|
||||||
|
if: matrix.platform == 'macos-latest' || matrix.platform == 'macos-15-intel'
|
||||||
|
run: |
|
||||||
|
brew install llvm
|
||||||
|
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
|
||||||
|
echo "LLVM_CONFIG=$(brew --prefix llvm)/bin/llvm-config" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
|
|||||||
@@ -26,6 +26,18 @@ def build_server():
|
|||||||
args.extend(['--paths', str(local_qwen_path)])
|
args.extend(['--paths', str(local_qwen_path)])
|
||||||
print(f"Using local qwen_tts source from: {local_qwen_path}")
|
print(f"Using local qwen_tts source from: {local_qwen_path}")
|
||||||
|
|
||||||
|
# Exclude unnecessary modules to reduce size
|
||||||
|
args.extend([
|
||||||
|
'--exclude-module', 'matplotlib',
|
||||||
|
'--exclude-module', 'IPython',
|
||||||
|
'--exclude-module', 'notebook',
|
||||||
|
'--exclude-module', 'pytest',
|
||||||
|
'--exclude-module', 'setuptools',
|
||||||
|
'--exclude-module', 'torch.distributions',
|
||||||
|
'--exclude-module', 'torch.testing',
|
||||||
|
'--exclude-module', 'tensorboard',
|
||||||
|
])
|
||||||
|
|
||||||
# Add hidden imports
|
# Add hidden imports
|
||||||
args.extend([
|
args.extend([
|
||||||
'--hidden-import', 'backend',
|
'--hidden-import', 'backend',
|
||||||
|
|||||||
Reference in New Issue
Block a user