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

Create a shareable Jupyter notebook for Chaste #2

Closed
kwabenantim opened this issue May 25, 2023 · 6 comments
Closed

Create a shareable Jupyter notebook for Chaste #2

kwabenantim opened this issue May 25, 2023 · 6 comments
Assignees

Comments

@kwabenantim
Copy link
Member

Summary

  • Enable users to use PyChaste with only a browser, without having to install any additional software.
  • Make it easy to create and share Chaste tutorial notebooks for others to modify and experiment with.
@kwabenantim kwabenantim self-assigned this May 25, 2023
@kwabenantim kwabenantim changed the title Create a shareable Colab notebook for Chaste Create a shareable Jupyter notebook for Chaste May 25, 2023
@kwabenantim
Copy link
Member Author

kwabenantim commented May 25, 2023

Colab Notebook Issues

  • With condacolab, we can potentially install chaste and dependencies from conda.
  • The default Python in Colab is 3.10, but the current chaste conda package only supports Python 3.7.
  • Python 3.7 support in condacolab is currently an issue: Python 3.7 conda-incubator/condacolab#45
  • Overwriting the default Python in the notebook's base conda environment can successfully change the Python version to 3.7 (i.e. remove pinned packages and run conda env update -n base -f environment.yml --purge). However, the required colabtools package only works with Python 3.8+.
  • Creating a constructor script for condacolab with all chaste dependencies appears to work, but fails to install, probably due to lack of support for Python 3.7.

Possible Workarounds

  • Rebuild PyChaste on conda with Python 3.10 support.
  • Create a JupyterHub server with chaste pre-installed.

@kwabenantim
Copy link
Member Author

Rebuilding PyChaste with Python 3.10 support.

  • The current chaste conda package was limited to Python 3.7 mainly because it's the highest supported version by chaste dependencies from conda-forge, particularly VTK <=8.2.
  • Rebuilding the chaste conda package for Python 3.10 will require building a custom VTK for conda.
  • We can try to build an older version of VTK e.g. VTK =7.0.0 with support for Python 3.10, which will also temporarily resolve the scene rendering issue for shared notebooks (Scene rendering is broken #1).

@kwabenantim
Copy link
Member Author

kwabenantim commented May 25, 2023

Building VTK 7.0.0 for conda with Python 3.10 support

Issues

  • sha mismatch: Fixed by updating sha string for vtk7.0.0 in meta.yaml
  • Patch error for 9987_try_except_python_import.patch : Disabled optional patch (temporarily)
  • CMake error - issue with gcc version: Fixed by adding gcc11-support.patch
  • CMake error - could not find osmesa: Changed build variant to osmesa (temporarily) so mesa gets installed from yum
  • MPI error -mpi4py/vtkmpi4py/src/mpi4py.MPI.c:106357:24: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?: Bumping mpich down from 4.* to 3.*
  • vtkWebGLExporter error -No module named 'vtk.vtkWebGLExporter': Disabled test for vtkWebGLExporter (temporarily)
  • ModuleNotFoundError: No module named 'vtkmodules':

@kwabenantim
Copy link
Member Author

VTK 7.1.1 with Python3.10 built and uploaded to Anaconda: https://anaconda.org/PyChaste/vtk

@kwabenantim
Copy link
Member Author

kwabenantim commented Jun 7, 2023

@kwabenantim
Copy link
Member Author

  • Now testing PyChaste in Colab

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

1 participant