forked from digitalearthafrica/cube-in-a-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
109 lines (96 loc) · 2.62 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
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.5
ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=C.UTF-8 \
LANG=C.UTF-8 \
USE_PYGEOS=0 \
SPATIALITE_LIBRARY_PATH='mod_spatialite.so' \
SHELL=bash \
TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
RUN apt update \
&& apt install -y curl \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt update \
&& apt install -y --fix-missing --no-install-recommends \
python3-full \
python3-dev \
python3-venv \
python3-pip \
# developer convenience
file \
fish \
git \
graphviz \
htop \
iproute2 \
iputils-ping \
jq \
less \
libtiff-tools \
net-tools \
openssh-client \
postgresql \
postgresql-client \
rsync \
simpleproxy \
sudo \
tig \
time \
tmux \
unzip \
vim \
wget \
xz-utils \
zip \
# rgsislib dependencies
libboost-date-time1.74.0 \
libboost-dev \
libboost-filesystem1.74.0 \
libboost-system1.74.0 \
libcgal-dev \
libgeos-dev \
libgsl-dev \
libmuparser2v5 \
libpq-dev \
libproj-dev \
# for cython to work need compilers
build-essential \
# for pyRAT install or something
libfftw3-dev \
liblapack-dev \
# install libhdf5
libhdf5-dev \
# install ffmpeg the normal way
ffmpeg \
nodejs \
# install texlive
texlive-fonts-recommended \
texlive-plain-generic\
texlive-xetex \
# Spatialite support
libsqlite3-mod-spatialite \
&& apt clean autoclean \
&& apt autoremove \
&& rm -rf /var/lib/{apt,dpkg,cache}
# Install yq
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
chmod +x /usr/bin/yq
# install pandoc 3.4.1
RUN wget https://github.com/jgm/pandoc/releases/download/3.4/pandoc-3.4-1-amd64.deb
RUN dpkg -i pandoc-3.4-1-amd64.deb
RUN rm pandoc-3.4-1-amd64.deb
# Set up the python virtual environment PEP 668.
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY requirements.txt /conf/
RUN python -m pip install --upgrade pip pip-tools
RUN pip install --no-cache-dir --requirement /conf/requirements.txt
RUN jupyter server extension enable --py --sys-prefix jupyterlab_iframe jupyter_resource_usage
ENV JUPYTERLAB_DIR=$VIRTUAL_ENV/share/jupyter/lab
COPY assets/overrides.json $JUPYTERLAB_DIR/settings/
COPY assets/jupyter_lab_config.py /etc/jupyter/
WORKDIR /notebooks
ENTRYPOINT ["/tini", "--"]
CMD ["jupyter", "lab", "--allow-root", "--ip=0.0.0.0", "--no-browser", "--port=8888"]