Repository navigation
fix(bootstrap): install piper-tts as a uv tool pinned to Python 3.13 #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -788,17 +788,6 @@ install_apt_packages() { | |
| # Install bazelisk | ||
| install_npm_package "bazelisk" "bazelisk" "@aspect/bazelisk" | ||
|
|
||
| # Install piper-tts (text-to-speech) | ||
| prompt_ai_install | ||
| if [[ "$INSTALL_AI" == true ]] && ! command -v piper >/dev/null 2>&1; then | ||
| if command -v pip3 >/dev/null 2>&1; then | ||
| echo "Installing piper-tts..." | ||
| pip3 install --user piper-tts 2>/dev/null || pip3 install --user --break-system-packages piper-tts || echo " Warning: Failed to install piper-tts (network issue?)" | ||
| else | ||
| echo "Skipping piper-tts (pip3 not installed)" | ||
| fi | ||
| fi | ||
|
|
||
| # Create fd alias (Debian/Ubuntu installs as fdfind) | ||
| if command -v fdfind >/dev/null 2>&1 && ! command -v fd >/dev/null 2>&1; then | ||
| sudo ln -sf "$(which fdfind)" /usr/local/bin/fd | ||
|
|
@@ -834,6 +823,9 @@ install_linux_common_packages() { | |
| echo "Installing uv..." | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh || echo " Warning: Failed to install uv (network issue?)" | ||
| fi | ||
| # The uv installer only edits shell rc files; expose ~/.local/bin to this run so | ||
| # update_packages can find uv (and the tools it installs) on a first bootstrap. | ||
| [[ -d "$HOME/.local/bin" && ":$PATH:" != *":$HOME/.local/bin:"* ]] && export PATH="$HOME/.local/bin:$PATH" | ||
|
|
||
| # Install atuin (shell history) | ||
| if ! command -v atuin >/dev/null 2>&1; then | ||
|
|
@@ -952,11 +944,20 @@ update_packages() { | |
| fi | ||
| fi | ||
|
|
||
| # Update pip packages (no safe "update all" — list managed packages explicitly) | ||
| # Install/upgrade piper-tts (text-to-speech) as an isolated uv tool, pinned to | ||
| # Python 3.13. A pip install into the system Python breaks whenever Homebrew | ||
| # bumps python@3: the old interpreter is removed (leaving a dangling `piper` | ||
| # shebang) and onnxruntime lags new Python releases by months, so the | ||
| # reinstall has no wheels to resolve. uv fetches a managed 3.13 if needed. | ||
| prompt_ai_install | ||
| if [[ "$INSTALL_AI" == true ]] && command -v pip3 >/dev/null 2>&1; then | ||
| echo "Updating pip packages..." | ||
| pip3 install --upgrade piper-tts 2>/dev/null || pip3 install --upgrade --break-system-packages piper-tts 2>/dev/null || true | ||
| if [[ "$INSTALL_AI" == true ]]; then | ||
| if command -v uv >/dev/null 2>&1; then | ||
| echo "Installing/updating piper-tts..." | ||
| # --force: take over a `piper` entrypoint left by an earlier pip --user install | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] |
||
| uv tool install --upgrade --force --python 3.13 piper-tts || echo " Warning: Failed to install piper-tts" | ||
| else | ||
| echo "Skipping piper-tts (uv not installed)" | ||
| fi | ||
| fi | ||
|
|
||
| echo "Package updates complete." | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] On a fresh Linux/SteamOS machine, uv may not be visible to this process yet.
install_linux_common_packagesinstalls uv withcurl … astral.sh/uv/install.sh | sh, which puts it in~/.local/bin. The installer edits shell rc files but not this process'sPATH, and bootstrap.sh never adds~/.local/bintoPATHitself. On a first./bootstrap.sh -p, from a shell where~/.local/binwasn't onPATH(Ubuntu's~/.profileonly adds it if the dir existed at login),command -v uvfails here and the run printsSkipping piper-tts (uv not installed). The old apt path installed piper on that first run viapip3 --user, so this is a small first-run regression. It fixes itself on the next run.Cheap fix: after the uv install in
install_linux_common_packages, mirror the~/.cargo/envpattern used for rustup, e.g.[[ -d "$HOME/.local/bin" && ":$PATH:" != *":$HOME/.local/bin:"* ]] && export PATH="$HOME/.local/bin:$PATH". Or have this check fall back to$HOME/.local/bin/uv.