/
Dockerfile
executable file
·85 lines (66 loc) · 2.68 KB
/
Dockerfile
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
83
84
85
# this Dockerfile is so we can try CREST without having to install anything
# we build upon a jupyter/scipy installation that was extended with z3
# within this docker only fast things happen (install graphviz, copy files, do pip things)
FROM jupyter/scipy-notebook:latest
LABEL maintainer="Stefan Klikovits <crest@klikovits.net>"
USER root
# install (patched) z3
RUN git clone https://github.com/stklik/z3.git
WORKDIR z3
RUN python scripts/mk_make.py --python
RUN cd build && make
RUN cd build && make install
WORKDIR ..
RUN rm -rf z3 # cleanup
# install graphviz and curl
RUN mkdir /var/lib/apt/lists/partial && \
apt-get update && \
apt-get install -y --no-install-recommends graphviz libgraphviz-dev curl dvipng && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install these through conda
RUN conda update -n base conda
RUN conda install numpy
RUN conda install pandas
RUN conda install matplotlib
RUN conda install scipy
RUN conda update networkx
RUN conda install -c conda-forge importnb
# let's also update everything while we're at it!
RUN conda update --all
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade importlib_resources
RUN pip install --no-cache-dir --upgrade methoddispatch
RUN pip install --no-cache-dir --upgrade plotly
RUN pip install --no-cache-dir --upgrade cufflinks
RUN pip install --no-cache-dir --upgrade astor
RUN pip install --no-cache-dir --upgrade pwlf
RUN pip install --no-cache-dir --upgrade graphviz pygraphviz
# RUN pip install --no-cache-dir --upgrade networkx
RUN pip install --no-cache-dir --upgrade colored
# install jupyter extensions
RUN pip install --no-cache-dir jupyter_contrib_nbextensions
RUN jupyter contrib nbextension install --system
RUN jupyter labextension update @jupyterlab/hub-extension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN jupyter labextension update jupyterlab_bokeh
RUN jupyter labextension install @jupyterlab/plotly-extension
RUN jupyter labextension install jupyter-matplotlib
RUN jupyter nbextension enable init_cell/main
RUN jupyter nbextension enable hide_input/main
RUN jupyter nbextension enable python-markdown/main
RUN jupyter nbextension enable code_prettify/code_prettify
RUN jupyter nbextension enable toc2/main
RUN jupyter nbextension enable codefolding/main
# get mxgraph into the docker
# RUN git clone https://github.com/jgraph/mxgraph.git
# Add Live slideshows with RISE
# RUN conda install -c damianavila82 rise
# copy CREST and tests into the container so we can use it
COPY crestdsl ${HOME}/crestdsl/
COPY tests ${HOME}/tests/
# copy the notebooks, so we have some inital stuff
COPY *.ipynb ${HOME}/
# some cleanup
RUN rmdir work
USER $NB_USER