You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a voice transcription project and using AWS Lambda for deployment. I am trying to run a voice transcription model in AWS Lambda. I am using few third party libraries that use their cache dir but in Lambda that path is read only.
How can I set a single cache dir for all the possible libraries so I can use Lambda's /tmp for storing cache. I do not want to set path for each library I want to set a single cache dir for all libraries. How can I do this? I know I can use following two methods for individual libraries for setting cache directories.
in Docker file:
ENV LIBRARY_CACHE_DIR /tmp/library_cache
In Python Code: os.environ['LIBRARY_CACHE_DIR'] = '/tmp/library_cache'
Issue with this approach is that I do not know in advance what libraries are required by my current third party libraries. If I have 1 or 2 libraries I can set their cache dir easily. But I am facing issues with multiple libraries. I have to set path for each library and test on Lambda. So I was thinking is there any way so that all the libraries cache dir is set via single command?
The text was updated successfully, but these errors were encountered:
mwunderl
changed the title
How to set .cache dir for python libraries in AWS Lambda environment
containers - set .cache dir for python libraries
Oct 31, 2023
I am working on a voice transcription project and using AWS Lambda for deployment. I am trying to run a voice transcription model in AWS Lambda. I am using few third party libraries that use their cache dir but in Lambda that path is read only.
How can I set a single cache dir for all the possible libraries so I can use Lambda's /tmp for storing cache. I do not want to set path for each library I want to set a single cache dir for all libraries. How can I do this? I know I can use following two methods for individual libraries for setting cache directories.
in Docker file:
ENV LIBRARY_CACHE_DIR /tmp/library_cache
In Python Code:
os.environ['LIBRARY_CACHE_DIR'] = '/tmp/library_cache'
Issue with this approach is that I do not know in advance what libraries are required by my current third party libraries. If I have 1 or 2 libraries I can set their cache dir easily. But I am facing issues with multiple libraries. I have to set path for each library and test on Lambda. So I was thinking is there any way so that all the libraries cache dir is set via single command?
The text was updated successfully, but these errors were encountered: