forked from jupyter/nbviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (33 loc) · 1.15 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
# Using the Ubuntu image
FROM ubuntu:14.04
MAINTAINER IPython Project <[email protected]>
# Make sure apt is up to date
RUN apt-get update
RUN apt-get upgrade -y
# Not essential, but wise to set the lang
RUN apt-get install -y language-pack-en
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
# Python binary dependencies, developer tools
RUN apt-get install -y -q build-essential make gcc zlib1g-dev git
RUN apt-get install -y -q python python-dev python-pip
# nbviewer binary dependencies
RUN apt-get install -y -q libzmq3-dev sqlite3 libsqlite3-dev pandoc libevent-dev libcurl4-openssl-dev libmemcached-dev nodejs
# install IPython 2.x branch
WORKDIR /srv
RUN git clone --depth 1 -b 2.x https://github.com/ipython/ipython.git
WORKDIR /srv/ipython
RUN git submodule init && git submodule update
RUN pip install .
ADD . /srv/nbviewer/
WORKDIR /srv/nbviewer
RUN pip install -r requirements.txt
EXPOSE 8080
# To change the number of threads use
# docker run -d -e NBVIEWER_THREADS=4 -p 80:8080 nbviewer
ENV NBVIEWER_THREADS 2
USER nobody
CMD ["python","-m","nbviewer","--port=8080"]