-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
59 lines (44 loc) · 1.24 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
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
software-properties-common
# To get necessary dependencies for gdal-bin
RUN add-apt-repository ppa:ubuntugis/ppa
RUN apt-get update
# Install required libraryes including GDAL development libraries
RUN apt-get update && apt-get install -y \
sudo\
python3.6\
python3-pip\
python3-gdal \
gdal-bin\
libgdal-dev
RUN ogrinfo --version
COPY requirements.txt /requirements.txt
RUN pip3 install --upgrade setuptools pip
# Install required libraryes including geoextent and GDAL
RUN pip3 install pygdal==$(gdal-config --version).* \
-r requirements.txt \
--no-cache-dir notebook==6.0.3 \
bash_kernel
# Install Jupyter kernel for bash
RUN python3 -m bash_kernel.install
COPY showcase/requirements.txt /requirements-showcase.txt
RUN pip3 install -r requirements-showcase.txt
RUN pip3 install geoextent
# Create a user
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
# Make contents available to users
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}
USER ${NB_USER}
WORKDIR ${HOME}