-
Notifications
You must be signed in to change notification settings - Fork 40
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
Kaleido fails on Docker on Lambda #74
Comments
I also occasionally get this error when trying different memory settings.
|
Hi @carterthayer, Huh, I don't have any idea off hand why lambda would behave differently here.
|
I'm just doing a regular I am not customizing any of the Chromium flags. Do you have any you suggest that I might try? |
I don't have any specific chromium flag recommendations. The current set of flags was chosen to try to make kaleido work by default inside docker containers. One user saw an improvement using the Could you try the following from the failing configuration to see if any more logging info is available? import plotly.io as pio
try:
fig.to_image()
except:
print(pio.kaleido.scope._std_error.getvalue().decode("utf8")) |
|
Ok, it does look like this GPU crashing error is the root issue here. We already set the Here's an SO post related to using chromium headless on Lambda: https://stackoverflow.com/questions/65429877/aws-lambda-container-running-selenium-with-headless-chrome-works-locally-but-not. And the accepted solution includes using the |
It worked! One of those flags did anyway. I'll do some trial and error to figure out which one it was and update the issue for others who come along and find this. |
Awesome! Yeah, we'd really appreciate it if you could narrow down which flag helped. If it doesn't look like it would cause any issues in other use cases, it would be great to add it to the default set. |
It was I added import plotly.io as pio
pio.kaleido.scope.chromium_args += ("--single-process",) Thanks for your help @jonmmease |
Ok! thanks letting us know. Looks like the need for
As we discussed a bit in #45, the Alternatively, I'd be open to checking environment variables to add Thanks! |
Update: I tried #76 adds the |
Automatic AWS Lambda detection released in 0.2.0. |
Hey @jonmmease I am facing the same issue, and using pio.kaleido.scope.chromium_args += ("--single-process",) Can you look into it? let me know which extra details you would like to know. Using kaleido==0.2.1 When executing: import plotly.graph_objects as go builtins.ValueError: Failed to start Kaleido subprocess. Error stream: [1017/090341.380752:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale Received signal 6 |
I am trying to generate a plotly chart and save it as a PNG in memory. I have my application packaged up and running in Docker locally. I am then using AWS Lambda to run this container, but fail when the save image command runs.
I get the error:
It seems weird to me that this would be working when I run it on Docker locally, but not on lambda.
Do you have any ideas or guidance into what is happening with Kaleido so I can figure out why it is failing?
The text was updated successfully, but these errors were encountered: