Deploy whisper as an AWS Lambda function #1364
Replies: 4 comments 4 replies
-
If you're using any Debian-based or linux image to run it, you don't need that file, instead install ffmpeg (and all of its dependencies) using the appropriate package manager and it should work. |
Beta Was this translation helpful? Give feedback.
-
To add to @Soykertje's comment, ffmpeg won't work when run like you have it locally. You need to install a version of ffmpeg that's compatible with AWS Lambda's runtime. Amazon has a guide on how to create a lambda layer: https://aws.amazon.com/blogs/media/processing-user-generated-content-using-aws-lambda-and-ffmpeg/ Essentially, this bundles/packages ffmpeg such that it is available to your lambda function invocation when added as a layer. The one caveat - ffmpeg won't be in the system path. That guide installs it at this path:
And so you would need to export |
Beta Was this translation helpful? Give feedback.
-
@michaelrubinfeldgg did you ever get this to work? I've found examples for other models (e.g. ocr), which leverage AWS EFS for model caching, but if you have succeeded here, we'd love a repo to reference! |
Beta Was this translation helpful? Give feedback.
-
Posting this here for anyone interested, Ive had this working for quite some time - here is my repo: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm trying to build a lambda function containing whisper. In my latest attempt I've received the following error message:
No such file or directory: 'ffmpeg'"
Did anyone come across this issue? I have ffmpeg.exe in the project file of the lambda, and when I run the same code outside of a lambda function context (code in .py file and ffmpeg.exe in the same directory) everything works fine.
Beta Was this translation helpful? Give feedback.
All reactions