-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (63 loc) · 2.58 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
FROM python:3.8.0-buster
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND teletype
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && apt-get remove ipython && ACCEPT_EULA=Y apt-get install -y --no-install-recommends \
apt-utils \
ca-certificates \
curl \
debconf-utils \
dirmngr \
gcc \
git \
g++ \
libgdal-dev \
libssl1.1 \
nodejs \
pandoc \
texlive-xetex \
libxss-dev \
libatk-bridge2.0-dev \
libgtk-3-0 \
libasound2 \
libbz2-dev \
&& cd /usr/local/bin \
&& pip3 install --upgrade pip \
&& apt-get clean
RUN npm --version
# install pandoc
#RUN wget -o /tmp/pandoc-2.7.1.deb https://github.com/jgm/pandoc/releases/download/2.7.1/pandoc-2.7.1-1-amd64.deb && \
# dpkg -i /tmp/pandoc-2.7.1.deb && \
# rm /tmp/pandoc-2.7.1.deb
COPY requirements.txt /tmp/
RUN pip3 install -r /tmp/requirements.txt
RUN pip3 install --force-reinstall --no-cache-dir jupyter
RUN pip3 freeze
RUN npm list --depth=1 -g && \
jupyter labextension install @jupyterlab/geojson-extension && \
jupyter labextension install jupyterlab-drawio && \
jupyter labextension install @jupyterlab/celltags && \
jupyter contrib nbextension install --system
# RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \
# && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture).asc" \
# && rm /usr/local/bin/gosu.asc \
# && chmod +x /usr/local/bin/gosu
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Install required python dependencies
# ------------------------------------
# Note: the GDAL package version must exactly match the one
# of installed libgdal-dev library version, hence the special treatment
# https://gis.stackexchange.com/a/119565
RUN pip3 install setuptools \
&& pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==$(gdal-config --version | awk -F'[.]' '{print $1"."$2}')
# Install what's in requirements.txt
# and some other extensions:
# - geojson-extension:
# - celltags: tag cells (e.g. with 'hidden' to exclude from export)
VOLUME /home/usr/notebooks
WORKDIR /home/usr/notebooks
EXPOSE 8888
#CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]
CMD ["jupyter", "lab", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]