optimized app to include code to download the binary and modify permissions in function initialization phase#1
Conversation
| def main(req: func.HttpRequest) -> func.HttpResponse: | ||
| # Azure File Share connection details | ||
| storage_account_name = os.getenv('AZURE_STORAGE_ACCOUNT_NAME') | ||
| container_name = 'azurefiles' |
There was a problem hiding this comment.
could we rename to ffmpegfiles or something like that to not confuse with Azure Files service?
| storage_account_name = os.getenv('AZURE_STORAGE_ACCOUNT_NAME') | ||
| container_name = 'azurefiles' | ||
| blob_name = 'ffmpeg' | ||
| local_ffmpeg_path = '/tmp/ffmpeg' |
There was a problem hiding this comment.
i wonder if this works on Windows. I can try later tonight.
| download_stream = blob_client.download_blob() | ||
| file_handle.write(download_stream.readall()) | ||
| from init_ffmpeg import initialize_ffmpeg | ||
| initialize_ffmpeg() |
There was a problem hiding this comment.
if and when we move to warm up triggers, i think this new function would need to be called warmup, and you would not call it from this function so it can be independent (but we should verify).
However since warmup trigger is not used yet, this looks good.
There was a problem hiding this comment.
If the goal of this is to initalize the files in blob storage with the right standalone distribution of ffmpeg, are we better off instead creating Pre-req steps in the readme instructing user to first create and then copy , , and to that container? Also did we miss Windows? That's pretty common.
added init_ffmpeg and init.py files