Skip to content

Python 3.6 container image: First fig.to_image call is very slow (~ 5 minutes) #36

Closed
@stephprobst

Description

@stephprobst

I'm trying to use kaleido on a Python 3.6 container provided by Redhat.

Container repo: https://github.com/sclorg/s2i-python-container/tree/master/3.6
Image: https://catalog.redhat.com/software/containers/rhscl/python-36-rhel7/599328ef5a13466ac6ac36aa

The minimum code sample I use for testing is:

import plotly.graph_objects as go
fig = go.Figure(data=[go.Scatter(y=[1, 3, 2])])
img_bytes = fig.to_image(format="png", width=200, height=200, scale=1)

I create a new, empty container, connect to it and run the code above. The initial call to the to_image method takes ~ 5 minutes to complete, independent of the assigned resources. All subsequent calls are very fast.

It doesn't matter if the container started a minute ago or half an hour ago. The initial call always takes 5 minutes.

Is this behavior by design? Can the initial start-up procedure really take that long or am I missing something?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions