Skip to content

Commit

Permalink
Use aws cli to fetch model download script
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Jan 31, 2025
1 parent 68f6a49 commit 9e22529
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions roles/whisperx/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
amigo_data_bucket: amigo-data-prod
model_script_stage: PROD
1 change: 1 addition & 0 deletions roles/whisperx/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
dependencies:
- pip3
- aws-tools
- role: packages
packages:
- ffmpeg
10 changes: 4 additions & 6 deletions roles/whisperx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
name: "{{ whisperx_package | default('whisperx') }}"
executable: pip3

- name: Simple GET operation
amazon.aws.s3_object:
bucket: amigo-data-prod
object: /deploy/PROD/whisperx-model-fetch/download_whisperx_models.py
dest: /tmp/download_whisperx_models.py
mode: get
- name: Download models script
shell: |
aws --quiet s3 cp s3://{{ amigo_data_bucket }}/deploy/{{ model_script_stage }}/whisperx-model-fetch/download_whisperx_models.py /tmp/download_whisperx_models.py
exit 0
- name: Download whisperx models
command: "python3 /tmp/download_whisperx_models.py --whisper-models --diarization-models --torch-align-models --huggingface-token {{ huggingface_token }}"
Expand Down

0 comments on commit 9e22529

Please sign in to comment.