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

Test visualisations in Colab #8

Closed
3 tasks done
kwabenantim opened this issue Jun 7, 2023 · 2 comments · Fixed by #10
Closed
3 tasks done

Test visualisations in Colab #8

kwabenantim opened this issue Jun 7, 2023 · 2 comments · Fixed by #10
Assignees

Comments

@kwabenantim
Copy link
Member

kwabenantim commented Jun 7, 2023

@kwabenantim kwabenantim self-assigned this Jun 7, 2023
@kwabenantim
Copy link
Member Author

kwabenantim commented Jun 8, 2023

Problem: scene.Start()

  • Kernel survives in Jupyter but dies in Colab after scene.Start():

  • The Colab error is:

INFO	KernelRestarter: restarting kernel (1/5), keep random ports
WARNING	vtkXOpenGLRenderWindow (0x3f627c0): bad X server connection. DISPLAY=
WARNING	ERROR: In /home/conda/feedstock_root/build_artifacts/vtk_1686064901542/work/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 300
WARNING	WARNING:root:kernel 4b3cf4d0-ff5b-4d11-9289-58e8acea4a0c restarted

Fix

# From same issue in https://github.com/Kaggle/docker-python/pull/360
!apt-get install -y xvfb
!mamba install -c conda-forge xvfbwrapper
from xvfbwrapper import Xvfb
vdisplay = Xvfb()
vdisplay.start()
render()
vdisplay.stop()

@kwabenantim
Copy link
Member Author

kwabenantim commented Jun 8, 2023

Problem: scene.SetSaveAsAnimation(True)

  • Kernel dies in locally compiled, pip-installed chaste in Jupyter notebook after:
scene.SetSaveAsAnimation(True)
scene.Start()
  • The Jupyter error is:
[I 18:16:30.536 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel 94d14e59-9a06-474e-bf03-5315bf2f7990 restarted
[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
  • The Xvfb solution above doesn't fix this.
  • Possibly due to system vtk.
  • The conda package runs fine in local Jupyter.

Fix:
Fixed by making JupyterNotebookManager a singleton. See #1 for related memory leak issues.

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 a pull request may close this issue.

1 participant