-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
121 lines (84 loc) · 2.95 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# docker for the MVA course
FROM ubuntu:xenial
MAINTAINER Gabriele Facciolo <[email protected]>
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-add-repository -y ppa:ubuntugis/ppa
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y \
build-essential \
gdal-bin \
geographiclib-tools \
git \
libfftw3-dev \
libgdal-dev \
libgeographic-dev \
libgeotiff-dev \
libtiff5-dev \
npm \
python3 \
python3-gdal \
python3-pip \
python3-numpy-dev \
software-properties-common \
imagemagick \
vim \
cmake \
unzip \
g++-7 \
curl
# nodejs-legacy \
## MISPLACED CV2 DEPENDENCY
RUN apt update && apt install -y libsm6 libxext6
## export jupyter to pdf
#RUN apt-get update && apt-get install -y \
# pandoc \
# texlive-xetex
# CREATE USER
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
# Make sure the contents of our repo are in ${HOME}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
#RUN pip3 install -U pip
#RUN python3 -m pip install --user --upgrade pip
RUN curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py && python3 get-pip.py --force-reinstall
# replace requirements line
RUN sed -i 's/4.5.3.56/3.4.0.12/g' ${HOME}/requirements.txt
# install requirements
RUN pip3 install -r ${HOME}/requirements.txt
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
jupyter nbextension enable --py --sys-prefix ipyleaflet
### jupyterhub extensions
RUN pip3 install jupyter_contrib_nbextensions && \
jupyter contrib nbextension install --system && \
jupyter nbextension enable --sys-prefix varInspector/main && \
jupyter nbextension enable --sys-prefix scratchpad/main
#&& \
# jupyter nbextension enable --sys-prefix collapsible_headings/main && \
# jupyter nbextension enable --sys-prefix toc2/main
# override notebook with a version that works with potree
RUN pip3 install notebook==5.4.1 tornado==5.1.1
# NODE
#RUN npm install n -g && n stable
#RUN npm install -g configurable-http-proxy
## single user server hack: run a http-server on the /shared directory
#RUN npm install -g http-server
# compile SRTM
#RUN cd ${HOME}/srtm4 && make
# compile potreeconverter
RUN cd /home/ && git clone https://github.com/gfacciol/PotreeConverter_PLY_toolchain.git && cd /home/PotreeConverter_PLY_toolchain && git submodule update --init --recursive && CC=gcc-7 CXX=g++-7 make && cp -r /home/PotreeConverter_PLY_toolchain/PotreeConverter/PotreeConverter/resources /home/PotreeConverter_PLY_toolchain/PotreeConverter/build/PotreeConverter/
# switch to user
USER ${NB_USER}
WORKDIR $HOME
# create a user, since we don't want to run as root
EXPOSE 8000:8000
#EXPOSE 8008:8008
#
#CMD ["jupyterhub-singleuser"]
CMD jupyter notebook --port=8000 --ip=0.0.0.0