-
Notifications
You must be signed in to change notification settings - Fork 69
/
Dockerfile
60 lines (49 loc) · 1.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
# Econometrics Book Docker Image
# User: jovyan
# This uses the Jupyter DataScience Docker Container with Python, R and Julia
FROM jupyter/datascience-notebook
MAINTAINER Matthew McKay <[email protected]>
USER root
#-Add Additional Debian Packages-#
RUN apt-get install -y --no-install-recommends curl ca-certificates dvipng
RUN echo "cacert=/etc/ssl/certs/ca-certificates.crt" > ~/.curlrc
#-Upgrade to Python=3.5-#
RUN conda install --yes \
python=3.5 \
'ipywidgets' \
'pandas' \
'matplotlib' \
'scipy' \
'seaborn' \
'scikit-learn' \
'scikit-image' \
'sympy' \
'cython' \
'patsy' \
'statsmodels' \
'cloudpickle' \
'dill' \
'numba' \
'bokeh' \
&& conda clean -yt
#-Additional Python Packages-#
RUN pip install quantecon
RUN $CONDA_DIR/envs/python2/bin/pip install quantecon
#-Add Templates-#
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/
ADD templates/ /srv/templates/
RUN chmod a+rX /srv/templates
#-Add Notebooks-#
ADD notebooks/ /home/jovyan/work/
#-Convert notebooks to the current format-#
RUN find /home/. -name '*.ipynb' -exec jupyter nbconvert --to notebook {} --output {} \;
RUN find /home/. -name '*.ipynb' -exec jupyter trust {} \;
USER jovyan
#-Additional Julia Packages-#
RUN echo "cacert=/etc/ssl/certs/ca-certificates.crt" > ~/.curlrc
RUN julia -e 'Pkg.add("PyCall"); Pkg.checkout("PyCall"); Pkg.build("PyCall"); using PyCall'
RUN julia -e 'Pkg.add("IJulia"); using IJulia'
RUN julia -e 'Pkg.add("PyPlot"); Pkg.checkout("PyPlot"); Pkg.build("PyPlot"); using PyPlot'
RUN julia -e 'Pkg.add("Distributions"); using Distributions'
RUN julia -e 'Pkg.add("KernelEstimator"); using KernelEstimator'
RUN julia -e 'Pkg.update()'