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:
Jamie Pine
2026-01-25 11:35:07 -08:00
parent 0f1aba7162
commit 9b7ee21e6c
2 changed files with 20 additions and 1 deletions
+12
View File
@@ -26,6 +26,18 @@ def build_server():
args.extend(['--paths', str(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
args.extend([
'--hidden-import', 'backend',