-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
93 lines (69 loc) · 2.92 KB
/
Dockerfile
File metadata and controls
93 lines (69 loc) · 2.92 KB
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
86
87
88
89
90
91
92
93
############################################################
# Dockerfile to build data science toolbox server container
# Based on Ubuntu
############################################################
# Set base image
FROM ubuntu
# File author/maintainer
MAINTAINER Alexander Fink <alexanderjfink@gmail.com>
RUN echo deb http://archive.ubuntu.com/ubuntu precise main universe multiverse > /etc/apt/sources.list
################## BEGIN INSTALLATION ######################
# Install Nginx and Git
RUN \
apt-get install -y python-software-properties && \
add-apt-repository ppa:nginx/stable && \
apt-get update && \
apt-get install -y git && \
apt-get update && \
apt-get install -y nginx && \
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
chown -R www-data:www-data /var/lib/nginx
#### SET UP PYTHON NLTK ####
#### http://nltk.org/ ####
#install the pip python package manager
RUN \
apt-get install -y python-pip vim git-core screen unzip libyaml-dev wget
#install the python package distribute, a prerequisite of nltk
RUN \
pip install distribute && \
pip install nltk
#download all the data packages for nltk
# RUN python -m nltk.downloader all
#### Python Port of Stanford NLP libraries ####
#### https://bitbucket.org/torotoki/corenlp-python ####
# install prerequisites
RUN pip install pexpect unidecode jsonrpclib
# clone the repository and download datafiles
RUN git clone https://bitbucket.org/torotoki/corenlp-python.git
# RUN wget http://nlp.stanford.edu/software/stanford-corenlp-full-2013-06-20.zip
# RUN unzip stanford-corenlp-full-2013-06-20.zip
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q r-base r-base-dev gdebi-core libapparmor1 supervisor sudo libcurl4-openssl-dev
RUN update-locale
RUN (wget http://download2.rstudio.org/rstudio-server-0.98.978-amd64.deb && gdebi -n rstudio-server-0.98.978-amd64.deb)
RUN rm /rstudio-server-0.98.978-amd64.deb
RUN (adduser --disabled-password --gecos "" guest && echo "guest:guest"|chpasswd)
RUN mkdir -p /var/log/supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# install python scikit
RUN apt-get install -y build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev libatlas-base-dev python-matplotlib
RUN pip install -U scikit-learn
# install ipython notebook
# http://ipython.org/notebook.html
# to run it ipython notebook
RUN apt-get install ipython-notebook
##################### INSTALLATION END #####################
#### SETUP NGINX ####
# Define mountable directories.
VOLUME ["/data", "/etc/nginx/sites-enabled", "/etc/nginx/conf.d", "/var/log/nginx"]
# Define working directory.
WORKDIR /etc/nginx
# Define default command.
CMD ["nginx"]
# Expose ports for nginx
EXPOSE 80 443
# Expose ports for RStudio Server
EXPOSE 8787 22
# CMD ["/usr/bin/supervisord"]
#### CSV FINGERPRINT ####
# Install CSV Fingerprint
RUN git clone https://github.com/setosa/csv-fingerprint.git /usr/share/nginx/html/csv-fingerprint