-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostBuild
executable file
·41 lines (30 loc) · 1.46 KB
/
postBuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# run matplotlib once to generate the font cache
python -c "import matplotlib as mpl; mpl.use('Agg'); import pylab as plt; fig, ax = plt.subplots(); fig.savefig('test.png')"
test -e test.png && rm test.png
# install and activate extensions in py2 env
source activate /srv/conda/envs/kernel
pip install ipywidgets==6.0.1 widgetsnbextension==2.0.1 && \
jupyter nbextension install --py --sys-prefix widgetsnbextension && \
jupyter nbextension enable --py widgetsnbextension --sys-prefix
pip install pythreejs==0.3.1 && \
jupyter nbextension install --py --sys-prefix pythreejs && \
jupyter nbextension enable --py pythreejs --sys-prefix
deactivate
# install pythreejs in py3 environment so that things match
source activate /srv/conda
pip install ipywidgets==6.0.1 widgetsnbextension==2.0.1 && \
jupyter nbextension install --py --sys-prefix widgetsnbextension && \
jupyter nbextension enable --py widgetsnbextension --sys-prefix
pip install pythreejs==0.3.1 && \
jupyter nbextension install --py --sys-prefix pythreejs && \
jupyter nbextension enable --py pythreejs --sys-prefix
# move cqjupyter module into startup folder, so show_object() works
# TODO: Have this pull from the cqnb github repo instead, so that future module updates are properly captured.
mkdir ~/.ipython && cd .ipython
mkdir profile_default && cd profile_default
mkdir startup && cd startup
cp ~/cqjupyter.py .
# clean up the folder
cd
rm apt.txt postBuild README.md requirements.txt runtime.txt