Skip to content

Permanent Solution for Plotly/Kaleido Headaches #1

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

Closed
wants to merge 4 commits into from

Conversation

ayjayt
Copy link

@ayjayt ayjayt commented Feb 24, 2025

Hi @mschoettle

This is my suggestion for using Kaleido going forward, permanently. In the future, we will release a higher-level API, but this one is permanent.

I made some improvements to our dependencies to support your alpine platform which has stricter permissions than our systems do, so we have to wait for those to get pushed to pypi.

Thank you so much for your patience.

@ayjayt
Copy link
Author

ayjayt commented Feb 24, 2025

  • Change out chromium installation method to last-known-good-version

RUN pip --no-cache-dir install plotly pandas

ARG kaleido_uri="git+https://github.com/plotly/kaleido@latest-tag#subdirectory=src/py"
RUN pip install "kaleido>=v1.0.0" || pip install ${kaleido_uri}
Copy link
Author

@ayjayt ayjayt Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once Kaleido v1.0.0 is released, this will automatically use that, but for now it uses github

@ayjayt ayjayt changed the title Peramnent Solution for Plotly Headaches Peramnent Solution for Plotly/Kaleido Headaches Feb 24, 2025

fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image("/output/figure.png", engine="kaleido")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API will be coming back in a few weeks, but the lower level API is here and it is stable.

@ayjayt ayjayt marked this pull request as ready for review February 24, 2025 18:27
@ayjayt
Copy link
Author

ayjayt commented Feb 24, 2025

kaleido_get_chrome is the best way to get a stable version of chromium that has no bugs, we test versions.

there are no musl-compiled versions of chromium available from google, so it won't work with alpine

let me know if i can help at all

@mschoettle mschoettle changed the title Peramnent Solution for Plotly/Kaleido Headaches Permanent Solution for Plotly/Kaleido Headaches Feb 26, 2025
@mschoettle
Copy link
Owner

@ayjayt Thanks a lot! I will give this a try soon

@ayjayt ayjayt closed this by deleting the head repository May 29, 2025
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

Successfully merging this pull request may close these issues.

2 participants