diff options
| author | yum <yum.food.vr@gmail.com> | 2022-12-16 17:38:27 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-12-16 17:42:03 -0800 |
| commit | b6a68f2569243cae224d7be8b02e2408aeaae699 (patch) | |
| tree | f3dfc48154f15939cfe848ac5653f249d7c966b7 /GUI | |
| parent | 00e1f1ac9f25d2ec346a09a6c6372fd93d404633 (diff) | |
Document embedded venv hack
Check in pip & modify embedded python to install to Lib and
Lib/site-packages. Experimentally, packages may be installed with pip
and do reside in Lib/site-packages. Hard to tell if this is also
touching files outside the venv.
Diffstat (limited to 'GUI')
| -rw-r--r-- | GUI/README.md | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/GUI/README.md b/GUI/README.md index 51440a0..18b6a35 100644 --- a/GUI/README.md +++ b/GUI/README.md @@ -3,9 +3,38 @@ 0. Open WSL. 1. Execute Libraries/fetch.sh. 2. Install Visual Studio 2022. -3. Open Libraries/wx/build/msw/wx_vc17.sln with Visual Studio 2022. +3. Open Libraries/wx/build/msw/wx\_vc17.sln with Visual Studio 2022. 4. Build x64/Release. 5. Open GUI/GUI.sln with Visual Studio 2022. 6. Build x64/Release. 7. Run package.ps1 from powershell. +## High level design + +* The GUI is written using wxWidgets. +* Python executes core business logic. We can't migrate away since + there's no CUDA-enabled Whisper implementation available in a good + systems programming language. +* To skirt licensing complexity, we distribute an embedded python + that's hacked up to allow installing packages via pip. We use this + to install packages at runtime (like a net installer), so we don't + actually distribute all our transitive dependencies. This also keeps + the package size small. + +## How the embedded python environment works + +I'm distributing an embeddable version of python from the official +python website. It's modified so that packages are installed under +Python/Lib/site-packages, instead of the usual filesystem paths. + +To bootstrap pip & fetch the dependencies needed: + +``` +cd TaSTT +./Resources/Python/python.exe Resources/Python/get-pip.py +./Resources/Python/python.exe -m pip install $YOUR\_PACKAGE\_HERE +``` + +This is logically what the GUI does internally when it creates the +python environment. + |
