dolfinx icon indicating copy to clipboard operation
dolfinx copied to clipboard

Reconsider interactive visualization in notebooks and release Docker images

Open jorgensd opened this issue 4 years ago • 1 comments

We currently use pyvista for in code visualization. This works for rendering static figures in notebooks and jupyterlab. There exists packages that can rendering interactive windows in notebooks:

  • Pyvtk_simple
  • ITKWidgets

However, neither is fully stable with jupyterlab 3.x, only working on a subset of systems. Another drawback is that ITKWidgets requires ~ 2GB of extra packages (itk-core etc), doubling the size of the docker images.

We should pay attention to the development of these packages, and see if they improve such that we can put them in a release image.

jorgensd avatar Feb 02 '21 12:02 jorgensd

@jorgensd any updates on this? pyvista has an updated page on the topic at https://docs.pyvista.org/user-guide/jupyter/index.html.

garth-wells avatar Jan 07 '22 09:01 garth-wells

pyvista has come a long way since, and now has very good support for interactive plotting in Jupyter.

@jorgensd do we need to add trame, or does it get installed with pyvista?

garth-wells avatar Mar 07 '23 08:03 garth-wells

trame is now the new recommend way of using pyvista with jupyter. For using trame, we would have to add (according to the docs https://docs.pyvista.org/user-guide/jupyter/trame.html#trame-jupyter):

python3 -m pip install 'jupyterlab>=3' ipywidgets 'pyvista[all,trame]'

However, I think we should figure out what deps in pyvista[all] is actually needed, as it also installs other backends, such as pythreejs and panel: https://github.com/pyvista/pyvista/blob/main/pyproject.toml#L41-L49 which we do not want

jorgensd avatar Mar 07 '23 09:03 jorgensd

@jorgensd can we close this now with all the pyvista changes?

garth-wells avatar Jul 12 '23 08:07 garth-wells

I'll revisit this soon (need to check the latest release of pyvista).

jorgensd avatar Jul 12 '23 09:07 jorgensd