Pyapp executable
Single executable file to run GLaDOS ! It is aimed for non-tech-savvy people that just want to see the project, you just have to double click and everything is handled for you.
Some informations about the changes done:
- I only install the onnxruntime-gpu package, from what I read it fallbacks to CPU if there is no GPU
- I had to change the resource path system, because I need paths that are relative to the executable
- I only manage to compile for linux amd64 and windows amd64.
- I tried to cross compile linux aarch64 and could not make it work
- For MacOS, it required files I don't have
Would be great to create a release on github. Or even better, add a github action to automatically do it every time we add a git tag for example.
Summary by CodeRabbit
-
New Features
- Automated first-run setup in packaged builds: installs prerequisites, pulls models/configs, and launches the TUI automatically.
- Module entrypoint added: app can be run as a module (python -m).
-
Improvements
- Better asset/config discovery in packaged apps.
- Optional GPU runtime support added via updated runtime dependency.
-
Documentation
- Added release-building instructions for creating platform executables.
-
Chores
- New packaging script and wheel build configuration; Git ignore updated to exclude pyapp build artifacts.
Walkthrough
Adds PyApp packaging and cross-compilation tooling, updates packaging/deps and .gitignore, makes resource resolution PYAPP-aware, introduces an automated Ollama installer and PYAPP-gated CLI auto-setup flow, provides a package entrypoint, and adds multiple default configs for TTS, app, and ASR.
Changes
| Cohort / File(s) | Summary |
|---|---|
Packaging & BuildREADME.md, .gitignore, pyproject.toml, scripts/compile_pyapp.sh |
Adds duplicated "Build releases" README sections, adds pyapp-latest/ to .gitignore, adds onnxruntime-gpu>=1.16.0 and a wheel build target in pyproject.toml, and introduces scripts/compile_pyapp.sh to build/cross-compile/AppImage and apply Windows metadata. |
PYAPP Runtime Integrationsrc/glados/__init__.py, src/glados/utils/resources.py, src/glados/tui.py |
On import set PYAPP_RELATIVE_DIR when PYAPP=1; make get_package_root() and resource_path() resolve differently under PYAPP; update TUI asset/config path resolution to use resource_path. |
CLI & Entrypointsrc/glados/__main__.py, src/glados/cli.py |
Add __main__ entrypoint; when PYAPP=1 and non-download command path, CLI calls automated_install(), launches tui(DEFAULT_CONFIG), and exits early. Adds automated_install symbol import and os usage. |
Automated Install Featuresrc/glados/utils/automated_install.py |
New module that checks/installs Ollama per-OS, ensures default config files exist in working dir (copying from package defaults), validates/downloads models, and pulls configured LLM via Ollama CLI; uses get_package_root() and PYAPP_RELATIVE_DIR. |
Default Configurationssrc/glados/default_configs/*src/glados/default_configs/glados.json, .../glados_config.yaml, .../parakeet-tdt-0.6b-v2_model_config.yaml |
Add TTS phoneme/config JSON, app-level glados_config.yaml (llm_model, completion_url, persona preprompt, IO settings), and a detailed Nemo RNNT BPE ASR model config (parakeet-tdt...). |
Sequence Diagram(s)
sequenceDiagram
autonumber
actor User
participant CLI as glados.cli
participant Auto as utils.automated_install
participant Res as utils.resources
participant TUI as glados.tui
User->>CLI: run `python -m glados` (PYAPP=1)
Note over CLI: non-download command path
CLI->>Auto: automated_install()
Auto->>Auto: check/install Ollama (per-OS)
Auto->>Res: resolve default config paths (PYAPP-aware)
Auto->>Auto: ensure defaults exist / validate or download models / ollama pull
Auto-->>CLI: return
CLI->>TUI: tui(DEFAULT_CONFIG)
TUI->>Res: load assets via resource_path()
TUI-->>User: UI starts
sequenceDiagram
autonumber
participant Env as Environment
participant Res as utils.resources
Env-->>Res: PYAPP != "1"
Res->>Res: get_package_root() -> climb to project root
Res-->>Env: resource_path = project_root / relative_path
Env-->>Res: PYAPP == "1"
Res->>Res: get_package_root() -> package dir (no climb)
Res-->>Env: resource_path = PYAPP_RELATIVE_DIR / relative_path
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~55 minutes
Possibly related PRs
- dnhkng/GLaDOS#115 — Overlaps on CLI changes and modifications to glados_config.yaml and the CLI/TUI flow.
- dnhkng/GLaDOS#136 — Overlaps on ASR model configuration additions and TDT/Parakeet model work.
- dnhkng/GLaDOS#142 — Related changes to configuration/engine surfaces and resource/entry flows.
Poem
I nibbled wires, packed a build so bright,
Cross-compiled dreams into AppImage light.
I fetched the models, set configs right—
A rabbit ships the TUI by night. 🐇✨
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title Check | ✅ Passed | The title "Pyapp executable" is short, focused, and directly reflects the PR’s primary change—providing a PyApp-packaged executable for end users (Linux and Windows) as described in the PR details, so it clearly communicates the main intent to reviewers. It avoids noise and unnecessary detail while remaining specific to the core change. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. |
✨ Finishing touches
- [ ] 📝 Generate Docstrings
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
[!TIP]
👮 Agentic pre-merge checks are now available in preview!
Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
- Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
- Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.
Please see the documentation for more information.
Example:
reviews: pre_merge_checks: custom_checks: - name: "Undocumented Breaking Changes" mode: "warning" instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.