Skip to content

Commit

Permalink
fix(installer, audio): postinstall whisper; download installer artefa…
Browse files Browse the repository at this point in the history
…cts (#865)

* postinstall whisper; download installer artefacts

* poetry lock
  • Loading branch information
abrichr authored Jul 25, 2024
1 parent dade1a1 commit a4470c3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 86 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ jobs:
with:
name: OpenAdapt
path: dist/
- name: Download macOS installer
uses: actions/download-artifact@v4
with:
name: OpenAdapt.dmg
path: dist/
- name: Download Windows installer
uses: actions/download-artifact@v4
with:
name: OpenAdapt_Installer
path: dist/
- name: Python Semantic Release
id: semantic_release
uses: python-semantic-release/[email protected]
Expand Down
87 changes: 2 additions & 85 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ pyqt-toast-notification = "^1.1.0"
pudb = "^2024.1"
llvmlite = "0.40.1rc1"
numba = "0.57.0"
openai-whisper = {git = "https://github.com/openai/whisper.git"}
sounddevice = "^0.4.6"
soundfile = "^0.12.1"
posthog = "^3.5.0"
Expand Down
19 changes: 19 additions & 0 deletions scripts/postinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ def install_detectron2() -> None:
sys.exit(1)


def install_whisper() -> None:
"""Install Whisper from its GitHub repository."""
try:
subprocess.check_call(
[
sys.executable,
"-m",
"pip",
"install",
"git+https://github.com/openai/whisper.git",
"--no-build-isolation",
]
)
except subprocess.CalledProcessError as e:
print(f"Error installing Whisper: {e}")
sys.exit(1)


def install_dashboard() -> None:
"""Install dashboard dependencies based on the operating system."""
original_directory = os.getcwd()
Expand Down Expand Up @@ -64,6 +82,7 @@ def main() -> None:
"""Main function to install dependencies."""
try:
install_detectron2()
install_whisper()
install_dashboard()
except Exception as e:
print(f"Unhandled error: {e}")
Expand Down

0 comments on commit a4470c3

Please sign in to comment.