Replies: 7 comments 20 replies
-
@damianzd1 Thank you for your question and welcome to the STUMPY community. This topic has been covered in more detail here and here are a few key points:
You can also get a list of the cached functions via:
and the cached functions (stored in
Note that:
Please feel free to ask any questions and provide any feedback. Again, this is purely experimental and should not be relied upon but, if it works, it's currently straightforward enough that I likely won't remove it (no guarantees though!). Use it at your own risk! |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the fast reply. I installed it from source on my local machine and on a test EC2. Worked as needed. I tried to create an AWS lambda docker image, but when executing the lambda I got this error:
I am trying to figure out what could've possibly gone wrong. I finished the docker file with a simple script (as you demonstrated) that did not error out during build time:
|
Beta Was this translation helpful? Give feedback.
-
Yes, I did try that as well, but sadly didn't work. I guess we will have to wait for Numbda to mature. You have been very helpful, thank you! PS: ohhh lord, I've missed it. I think this is what I've been looking for: discussion |
Beta Was this translation helpful? Give feedback.
-
Yes, you are correct. It's not an issue with Numba. I did some more testing. I found the issue but I have no idea what to do about it or even what exactly is happening. I managed to build a docker image from a base aws python lambda image. It works as intended when testing locally, but fails when uploaded to AWS and actually used by a lambda. The issue is that Aws runs the docker container with different user/group IDs. It doesn't matter if I set NUMBA_CACHE_DIR=/tmp. It runs it with User ID: 993, Group ID: 990 and it throws: |
Beta Was this translation helpful? Give feedback.
-
Yes, all of them just not in the exact same format. But more than enough, I set |
Beta Was this translation helpful? Give feedback.
-
Okay... I am wrong again. I guess I trusted the awws docker local tests too much. You are correct. There is nothing in the /tmp once it runs on AWS servers and I wasn't able to read anything. I changed the target from /tmp to LAMBDA_TASK_ROOT which is /var/task and now I am able to read the test.txt inside the lambda running on aws. Tomorrow I will gather the strength to rebuild everything and try caching to /var/task. For reference this si the working setup:
|
Beta Was this translation helpful? Give feedback.
-
Hmm, I didn't notice this before. The code errors out not when calling Dockerfile
stumpy_compile.py
app.py
Run locally, runs successfully (performs as desired):
Run locally, the way aws lambda service runs the container (results in error):
Call the lambda function locally:
Linux curl:
Running on aws results in the same error as running locally with
the docker log:
|
Beta Was this translation helpful? Give feedback.
-
@damianzd1 had asked:
Beta Was this translation helpful? Give feedback.
All reactions