-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathDockerfile
59 lines (47 loc) · 2.16 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
# quantecon.notebooks Docker Image (for mybinder.org service)
# User: main
# Environments: Python3.5 and Julia0.3
FROM debian:latest
MAINTAINER Matthew McKay <mamckay@gmail.com>
USER root
#-Update Debian Base-#
RUN apt-get update -y
RUN apt-get install -y --no-install-recommends curl ca-certificates hdf5-tools wget tar
#-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 wget --quiet https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.0-linux-x86_64.tar.gz
RUN tar -xvzf julia-1.8.0-linux-x86_64.tar.gz
RUN cp -r julia-1.8.0 /opt/
RUN ln -s /opt/julia-1.8.0/bin/julia /usr/local/bin/julia
RUN useradd -r main
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://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
RUN bash Anaconda3-2022.05-Linux-x86_64.sh -b && rm Anaconda3-2022.05-Linux-x86_64.sh
ENV PATH $HOME/anaconda3/bin:$PATH
RUN /bin/bash -c "ipython kernelspec install-self --user"
RUN conda update conda --yes && conda update anaconda --yes
RUN conda install pymc && conda install seaborn
#-Install Pip Packages
RUN pip install --upgrade pip
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'
RUN julia -e 'Pkg.add("Roots"); using Roots'