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

Support VTK + Trame #7391

Open
akaszynski opened this issue Oct 12, 2024 · 2 comments
Open

Support VTK + Trame #7391

akaszynski opened this issue Oct 12, 2024 · 2 comments

Comments

@akaszynski
Copy link

Trame integration with Panel has been an ask for a while (see #4761), especially as the vtk.js serializer used within Panel is not as up-to-date as the one in Trame. It's possible to do this within an iframe via:

https://github.com/pyvista/panel-example/blob/15e1f5758ed79e08a8beeaf7042192e02c3e3f50/app/common.py#L26-L28

However, the trame backend requires a separate port to be open, meaning it's not possible to deploy this as a containerized application when the infrastructure only supports exposing a single port (e.g. port 8080).

Solution

We've recently implemented an example that uses jupyter-server-proxy to proxy the traffic from the Panel app to the trame port:

Repo - https://github.com/pyvista/panel-example
Demo - https://panel-example-production.up.railway.app/

This isn't an elegant solution since it requires us to patch the tornado handlers:
https://github.com/pyvista/panel-example/blob/15e1f5758ed79e08a8beeaf7042192e02c3e3f50/app/app.py#L38-L40

If you could point us in the right direction, we'd be happy to submit a PR to holoviz/panel.

CC @banesullivan and @jourdain

@jourdain
Copy link

An approach like we do in trame-jupyter-extension where we use the communication layer of the hosting environment (jupyter in that case) might be the proper integration mechanism. So ideally, if we can provide some JS and Python adapter to it, we should be able to complete such integration.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Oct 12, 2024

See also #4761 (comment) and #2752.

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

3 participants