Skip to content

Commit 33c3913

Browse files
committed
fix: resolve Parakeet sidecar MLX module loading and build issues
- Fix MLX module collection in PyInstaller spec to include all required submodules - Add proper collection of mlx._os_warning and other missing modules - Update build script to use macOS-specific spec file - Configure sidecar as background process with LSUIElement=1 (untested for focus issue) - Set console=False in spec file to prevent console window creation - Fix dashboard auto-open on dev server by setting visible=false in tauri.conf.json Note: Window focus stealing issue may still exist - needs further testing
1 parent ead96e3 commit 33c3913

File tree

3 files changed

+293
-156
lines changed

3 files changed

+293
-156
lines changed

scripts/build-parakeet-sidecar.sh

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,28 @@ uv sync --group build
1515
# Clean previous artifacts
1616
rm -rf "$DIST_DIR"
1717

18-
# Build the single-file sidecar binary
19-
uv run --group build pyinstaller \
20-
--clean \
21-
--onefile \
22-
--name parakeet-sidecar \
23-
--hidden-import mlx._reprlib_fix \
24-
--collect-submodules mlx \
25-
--collect-submodules parakeet_mlx \
26-
--collect-data parakeet_mlx \
27-
--collect-data mlx \
28-
src/parakeet_sidecar/main.py
18+
# Detect OS and use appropriate spec file
19+
OS_NAME=$(uname -s)
20+
if [[ "$OS_NAME" == "Darwin" ]]; then
21+
echo "Building for macOS with background process configuration..."
22+
# Use macOS-specific spec file to prevent focus stealing
23+
uv run --group build pyinstaller \
24+
--clean \
25+
parakeet-sidecar-macos.spec
26+
else
27+
echo "Building for $OS_NAME..."
28+
# Use default PyInstaller configuration for other platforms
29+
uv run --group build pyinstaller \
30+
--clean \
31+
--onefile \
32+
--name parakeet-sidecar \
33+
--hidden-import mlx._reprlib_fix \
34+
--collect-submodules mlx \
35+
--collect-submodules parakeet_mlx \
36+
--collect-data parakeet_mlx \
37+
--collect-data mlx \
38+
src/parakeet_sidecar/main.py
39+
fi
2940

3041
# Create a target-suffixed copy for Tauri bundling
3142
HOST_TRIPLE=$(rustc -vV | sed -n 's/^host: //p')

0 commit comments

Comments
 (0)