-
Notifications
You must be signed in to change notification settings - Fork 6
/
postBuild
21 lines (17 loc) · 982 Bytes
/
postBuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Not needed if installed ipywidgets using conda
jupyter nbextension enable --py widgetsnbextension --sys-prefix
# Enable per-Notebook table of contents in Jupyter UI
# 1: Install jupyter_contrib_nbextensions package
pip install --upgrade-strategy only-if-needed jupyter_contrib_nbextensions
# 2: Configure jupyter_contrib_nbextensions: the following "copies the
# nbextensions' javascript and css files into the jupyter server's
# search directory"
jupyter contrib nbextension install --sys-prefix
# 3: Enable the TOC2 extension
jupyter nbextension enable toc2/main
# 4: Enable Nbextensions tab in Jupyter UI; should not be necessary if installed nbextensions_configurator using conda
jupyter nbextensions_configurator enable --sys-prefix
# run matplotlib once to generate the font cache
python -c "import matplotlib as mpl; mpl.use('Agg'); import matplotlib.pyplot as plt; fig, ax = plt.subplots(); fig.savefig('test.png')"
test -e test.png && rm test.png