-
Notifications
You must be signed in to change notification settings - Fork 325
/
Dockerfile
53 lines (41 loc) · 1.94 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
# quantecon.applications Docker Image (for mybinder.org service)
# User: main
# Environments: Python3.5 and Julia0.3
FROM andrewosh/binder-base
MAINTAINER Matthew McKay <[email protected]>
USER root
#-Update Debian Base-#
RUN apt-get update -y
RUN apt-get install -y --no-install-recommends curl ca-certificates hdf5-tools
#-Install texlive-#
RUN apt-get update -y && apt-get install -yq --no-install-recommends \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-extra \
texlive-fonts-recommended \
&& apt-get clean
# Julia dependencies
RUN apt-get install -y --no-install-recommends julia libnettle4 && apt-get clean
#-Re-Install Conda for Python3.5 Anaconda Distributions-#
RUN rm -r /home/main/anaconda
USER main
#-NOTE: $HOME/anaconda/envs/python3 is the location anaconda is installed in andrewosh/binder-base
#-If this get's updated then the following instructions will break.
#-TODO: This step can be removed once the base image is upgraded to python=3.5
RUN wget --quiet https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.4.1-Linux-x86_64.sh
RUN bash Anaconda3-2.4.1-Linux-x86_64.sh -b && rm Anaconda3-2.4.1-Linux-x86_64.sh
ENV PATH $HOME/anaconda3/bin:$PATH
RUN /bin/bash -c "ipython kernelspec install-self --user"
#-Install Pip Packages
RUN pip install quantecon
#-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.add("QuantEcon"); using QuantEcon'
RUN julia -e 'Pkg.add("Gadfly"); using Gadfly'
RUN julia -e 'Pkg.add("Optim"); using Optim'
RUN julia -e 'Pkg.add("Grid"); using Grid'