forked from jupyter/nbviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (47 loc) · 1.19 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
# Using the Ubuntu image
FROM debian:jessie
MAINTAINER Project Jupyter <[email protected]>
RUN apt-get update \
&& apt-get install -y -q \
build-essential \
gcc \
git \
libcurl4-openssl-dev \
libmemcached-dev \
libsqlite3-dev \
libzmq3-dev \
make \
nodejs \
nodejs-legacy \
npm \
pandoc \
python3-dev \
python3-pip \
sqlite3 \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# To change the number of threads use
# docker run -d -e NBVIEWER_THREADS=4 -p 80:8080 nbviewer
ENV NBVIEWER_THREADS 2
EXPOSE 8080
RUN pip3 install invoke
WORKDIR /srv/nbviewer
# asset toolchain
ADD ./package.json /srv/nbviewer/
RUN npm install .
# python requirements
ADD ./requirements.txt /srv/nbviewer/
RUN pip3 install -r requirements.txt && pip3 freeze
# tasks will likely require re-running everything
ADD ./tasks.py /srv/nbviewer/
# front-end dependencies
ADD ["./nbviewer/static/bower.json", "./nbviewer/static/.bowerrc", \
"/srv/nbviewer/nbviewer/static/"]
RUN invoke bower
# build css
ADD . /srv/nbviewer/
RUN invoke less
# root up until now!
USER nobody
CMD ["python3", "-m", "nbviewer", "--port=8080"]