Skip to content

Commit

Permalink
Merge pull request #1606 from guardian/pm-whisperx-role
Browse files Browse the repository at this point in the history
Add WhisperX Role
  • Loading branch information
philmcmahon authored Jan 22, 2025
2 parents 5439aa8 + 53d0f7f commit 65deded
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/packer/PackerBuildConfigGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ object PackerBuildConfigGenerator {
val instanceSize = if (requresXlargeBukder) "xlarge" else "small"

val instanceType = sourceAmiMetadata.architecture match {
case "x86_64" => s"t3.${instanceSize}"
case "arm64" => s"t4g.${instanceSize}"
case "x86_64" => s"t3.$instanceSize"
case "arm64" => s"t4g.$instanceSize"
case other =>
throw new IllegalArgumentException(
s"Don't know what instance type to use to bake an AMI for $other"
Expand Down
6 changes: 6 additions & 0 deletions roles/whisperx/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
dependencies:
- pip3
- role: packages
packages:
- ffmpeg
21 changes: 21 additions & 0 deletions roles/whisperx/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: Upgrade packaging
pip:
name: "packaging"
state: "latest"
executable: pip3

- name: Install whisperx dependencies
pip:
name:
- torch==2.0.0
- torchvision==0.15.1
- torchaudio==2.0.1
executable: pip3
extra_args: "--index-url https://download.pytorch.org/whl/cu118"

- name: Install whisperx
pip:
name: whisperx
executable: pip3

0 comments on commit 65deded

Please sign in to comment.