-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
42 lines (30 loc) · 1.45 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
FROM ubuntu:18.04
LABEL maintainer="ivandorte@gmail.com"
# Add ubuntugis/ppa
RUN apt-get update && \
apt-get install -y software-properties-common && \
rm -rf /var/lib/apt/lists/*
RUN add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
# install the GDAL/OGR package & GDAL development libraries
RUN apt-get install -y gdal-bin libgdal-dev libproj-dev libgeos-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
# Upgrade installed packages
RUN apt-get update && apt-get upgrade -y && apt-get clean
# (...)
# Python package management and basic dependencies
RUN apt-get install -y curl python3.7 python3.7-dev python3.7-distutils locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# it_IT.UTF-8 UTF-8/it_IT.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
# Register the version in alternatives
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
# Set python 3 as the default python
RUN update-alternatives --set python /usr/bin/python3.7
# Upgrade pip to latest version
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py --force-reinstall && \
rm get-pip.py
# Install packages
RUN pip install shapely --upgrade --no-binary shapely
RUN pip install matplotlib pandas jupyterlab nbformat nbconvert fiona rtree rasterio pyproj geopandas pysal mapclassify basemap basemap-data basemap-data-hires