Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You should set the environment variable TRANSFORMERS_CACHE to a writable directory. #2

Open
existeundelta opened this issue Feb 16, 2023 · 1 comment

Comments

@existeundelta
Copy link

existeundelta commented Feb 16, 2023

without using cdk, set up the lambda but getting this error:

There was a problem when trying to write in your cache folder (/var/task/cache/). You should set the environment variable TRANSFORMERS_CACHE to a writable directory.

for default will be
/tmp
?

@existeundelta
Copy link
Author

added

import os
os.environ['MPLCONFIGDIR'] = os.getcwd() + "/tmp/configs/"
os.environ['TRANSFORMERS_CACHE'] = os.getcwd() + '/tmp/cache/'

at the beggining of app.py solved
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant