Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-22.04, macos-latest, windows-latest]
torch_variant: [cpu, cu129]
include:
- os: ubuntu-latest
- os: ubuntu-22.04
platform: linux-x64
build_script: ./INSTALL/pyinstaller/make_pyinstaller_image.sh
executable_ext: ""
Expand Down
13 changes: 8 additions & 5 deletions INSTALL/pyinstaller/make_pyinstaller_image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ switch ($TorchVariant) {
}

# Set PyInstaller mode based on torch variant
if ($TorchVariant -eq "cpu") {
$pyinstallerMode = "--onefile"
} else {
$pyinstallerMode = "--onedir"
}
# if ($TorchVariant -eq "cpu") {
# $pyinstallerMode = "--onefile"
# } else {
# $pyinstallerMode = "--onedir"
# }

# --onefile has too many problems with large packages like torch!
$pyinstallerMode = "--onedir"

# Upgrade build tools and hooks
python -m pip install -U pip wheel setuptools
Expand Down
8 changes: 5 additions & 3 deletions INSTALL/pyinstaller/make_pyinstaller_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ fi
# Set PyInstaller mode based on torch variant and platform
if [[ "$MACOS_APP" == true ]]; then
PYINSTALLER_MODE="--windowed"
elif [[ "$TORCH_VARIANT" == cpu ]]; then
PYINSTALLER_MODE="--onefile"
# always use --onedir for CPU builds to avoid startup issues
# elif [[ "$TORCH_VARIANT" == cpu ]]; then
# PYINSTALLER_MODE="--onefile"
else
PYINSTALLER_MODE="--onedir"
fi
Expand Down Expand Up @@ -140,7 +141,8 @@ if [[ "$MACOS_APP" == true ]]; then
LAUNCHER="$MACOS_DIR/run_in_terminal.sh"
cat > "$LAUNCHER" <<EOF
#!/bin/bash
exec osascript -e 'tell application "Terminal" to do script "'"$MACOS_DIR/$BIN_NAME"'"'
PWD=$(dirname "$0")
exec osascript -e 'tell application "Terminal" to do script "'"$PWD/$BIN_NAME"'"'
EOF
chmod +x "$LAUNCHER"

Expand Down