diff --git a/.github/workflows/deploy-pyinstaller.yml b/.github/workflows/deploy-pyinstaller.yml index c46d638c..e12dac9f 100644 --- a/.github/workflows/deploy-pyinstaller.yml +++ b/.github/workflows/deploy-pyinstaller.yml @@ -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: "" diff --git a/INSTALL/pyinstaller/make_pyinstaller_image.ps1 b/INSTALL/pyinstaller/make_pyinstaller_image.ps1 index 402b0f3f..afa387dc 100644 --- a/INSTALL/pyinstaller/make_pyinstaller_image.ps1 +++ b/INSTALL/pyinstaller/make_pyinstaller_image.ps1 @@ -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 diff --git a/INSTALL/pyinstaller/make_pyinstaller_image.sh b/INSTALL/pyinstaller/make_pyinstaller_image.sh index 8181496d..8a6be27a 100755 --- a/INSTALL/pyinstaller/make_pyinstaller_image.sh +++ b/INSTALL/pyinstaller/make_pyinstaller_image.sh @@ -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 @@ -140,7 +141,8 @@ if [[ "$MACOS_APP" == true ]]; then LAUNCHER="$MACOS_DIR/run_in_terminal.sh" cat > "$LAUNCHER" <