I'd like to make interactive slide set (for a presentation with some live coding in python) with RISE a.k.a. live_reveal, which is a notebook extension for Jupyter.
I'd like the slide set to be usable by others (and by my future self) without too many manual steps (and without relying on hosted Jupyter solutions), thus I've chosen pipenv
to manage dependencies.
I can get started with
pipenv install RISE
pipenv run jupyter nbextension install rise --py --sys-prefix
pipenv run jupyter nbextension enable rise --py --sys-prefix
pipenv run jupyter notebook # to start the jupyter server
However, only pipenv install RISE
leaves traces in the local directory (in Pipfile
and Pipfile.lock
). So, when using my files on a new machine (or after pipenv --rm
) just
pipenv install
pipenv run jupyter notebook
won't suffice. The two nbextension
steps will have to be repeated to enable the RISE extension and have the button available in Jupyter notebooks to switch to presentation mode.
Can this be automated? (Without employing additional tools like conda, docker, vagrant, make or other build systems, ...) If so, how should it be automated?
Can I tell pipenv
(e.g. in Pipfile
) to run these two commands after package installation? Or should I let the notebook (the *.ipynb
file) load the extensions somehow?