/
postBuild
82 lines (63 loc) · 3.09 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ----- TM129 repo2docker: postBuild ---
# Copy in a datestamp for start of postBuild activity
echo "postBuild start time: $(date)" >> $CONDA_DIR/tm129_image_build_time.txt
# Install and enable extensions
INSTALL_PREFIX=sys-prefix #user
# Stash notebook files in the $CONDA_DIR so we can retrieve them
mkdir -p ${CONDA_DIR}/workfiles/recover
cp -r .jupyter ${CONDA_DIR}/workfiles/recover
cp -r .ipython ${CONDA_DIR}/workfiles/recover
cp -r content ${CONDA_DIR}/workfiles/recover
## nbextensions
### The official unofficial extensions distribution
jupyter contrib nbextension install --$INSTALL_PREFIX
jupyter nbextensions_configurator enable --$INSTALL_PREFIX
## By default, the majority of extensions are disabled by default
### Nicer code warning / error message display
jupyter nbextension enable skip-traceback/main --$INSTALL_PREFIX
### Collapsible headings can help in notebook user interaction design
jupyter nbextension enable collapsible_headings/main --$INSTALL_PREFIX
### Codefolding may be useful BUT it interferes with nbtutor...
#jupyter nbextension enable codefolding/main --$INSTALL_PREFIX
### Allow users to highlight elements
jupyter nbextension enable highlighter/highlighter --$INSTALL_PREFIX
## Spellchecker extension
jupyter nbextension enable spellchecker/main --$INSTALL_PREFIX
## nbgitpuller
### This allows us to easily pull in files from Github
jupyter serverextension enable nbgitpuller --$INSTALL_PREFIX
## Accessibility toolbar
### This seems to be a bit buggy at the moment, but useful nevertheless
git clone https://github.com/uclixnjupyternbaccessibility/accessibility_toolbar.git
jupyter nbextension install --$INSTALL_PREFIX accessibility_toolbar
### Tidy up
rm -r accessibility_toolbar
#jupyter nbextension enable accessibility_toolbar/main --$INSTALL_PREFIX
#jupyter nbextension disable accessibility_toolbar/main --$INSTALL_PREFIX
## Graffiti
### Support for interactive intra-notebook tutorials
### The pypi package lags the repo
##git clone https://github.com/willkessler/jupytergraffiti.git
jupyter nbextension install --$INSTALL_PREFIX jupytergraffiti/jupytergraffiti/graffiti_extension
### Tidy up
#rm -r jupytergraffiti
#jupyter nbextension enable graffiti_extension/main --$INSTALL_PREFIX
#jupyter nbextension disable graffiti_extension/main --$INSTALL_PREFIX
## nbzip
### Zip and export all notebooks
jupyter serverextension enable --py nbzip --$INSTALL_PREFIX
jupyter nbextension install --py nbzip --$INSTALL_PREFIX
jupyter nbextension enable --py nbzip --$INSTALL_PREFIX
## nbtutor
jupyter nbextension install --py nbtutor --user
jupyter nbextension enable --py nbtutor --user
## cell_execution_status
### Cell status indicators.
jupyter nbextension install cell_execution_status --$INSTALL_PREFIX
jupyter nbextension enable cell_execution_status/index --$INSTALL_PREFIX
## WYSIWYG notebook markdown editor
jupyter nbextension install --py jupyter_wysiwyg --$INSTALL_PREFIX
# Copy in a datestamp of end of build - checks we got this far as well!
echo "postBuild end time: $(date)" >> $CONDA_DIR/tm129_image_build_time.txt
# GDAL / osgeo - Lidar mapping
#conda install -y -c conda-forge gdal