-
Notifications
You must be signed in to change notification settings - Fork 0
/
spatial-analytics.dockerfile
43 lines (35 loc) · 1.47 KB
/
spatial-analytics.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
# Use Python 3.10 (should match with Python interpreter in environment.yml)
FROM jupyter/minimal-notebook:python-3.10.11
MAINTAINER Henrikki Tenkanen <henrikki.tenkanen@aalto.fi>
# Install openjdk
USER root
RUN apt-get update \
&& apt-get clean
# OpenJDK 11 not needed anymore for r5py
# && apt-get install -y openjdk-11-jdk \
# the user set here will be the user that students will use
USER $NB_USER
ENV HOME /home/$NB_USER
ENV NODE_OPTIONS=--max-old-space-size=4096
COPY environment.yml .
COPY requirements.txt .
COPY ./instance_start_script.sh /usr/local/bin/instance_start_script.sh
### Installing the GIS libraries
RUN echo "Upgrading conda" \
&& conda install --override-channels -c conda-forge mamba 'python_abi=*=*cp*' \
&& mamba env update -n base -f environment.yml \
&& pip install -r requirements.txt \
&& jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager \
&& jupyter lab build \
&& conda clean --all --yes --force-pkgs-dirs \
&& jupyter lab clean -y \
&& npm cache clean --force # \
&& find /opt/conda/ -follow -type f -name '*.a' -delete \
&& find /opt/conda/ -follow -type f -name '*.pyc' -delete \
&& find /opt/conda/ -follow -type f -name '*.js.map' -delete \
&& find /opt/conda/lib/python*/site-packages/bokeh/server/static \
-follow -type f -name '*.js' ! -name '*.min.js' -delete
USER $NB_USER
WORKDIR /home/$NB_USER
CMD ["/usr/local/bin/instance_start_script.sh"]