Fix Live Code/Binder for course
Opened this issue · 1 comments
lannelin commented
Fix Live Code (Thebe) and Binder for course so all code cells in taught pages run in Live Code and all hands-on notebooks execute in Binder.
Currently:
- Works for most files
- Live Code cwd is the repository root, unlike behaviour in jupyter notebook. See jupyterbook issue
- breaks examples that use relative paths from file's dir (e.g. 2.4.3).
- Binder image does not have deps installed for opencv
- breaks 2.2.4.4. Results in:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- requires a custom Dockerfile?
- breaks 2.2.4.4. Results in:
lannelin commented
Hacky fix for teaching: if we want to use Live Code we can ask the participants to change directory in first cell on page.
E.g., for module 2:
import os
os.chdir("./coursebook/modules/m2")