forked from IBM/ibmpairs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
82 lines (75 loc) · 1.92 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
#########################################################
# IBM PAIRS API wrapper docker image generation #
#########################################################
# Copyright 2019 Physical Analytics, IBM Research, IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
FROM alpine:3.8
# variable settings
MAINTAINER IBM PAIRS "[email protected]"
ENV PYTHONUNBUFFERED 1
# install required Alpine software
RUN apk add \
libffi \
libffi-dev \
python3-dev \
zlib-dev \
jpeg-dev \
tiff-dev \
g++ \
make \
musl-dev \
zeromq-dev \
git
# compile and install GEOS specific software (required for shapely)
ADD http://download.osgeo.org/geos/geos-3.6.2.tar.bz2 /root/
RUN cd /root && tar xjf geos-3.6.2.tar.bz2
RUN cd /root/geos-3.6.2 && \
./configure --enable-python && \
make && \
make install
RUN geos-config --cflags
# install required Python modules
RUN pip3 install --upgrade pip
## IBM PAIRS API wrapper requirements
RUN pip3 install \
future \
requests \
geojson \
numpy \
pandas \
shapely \
Pillow
# installs not strictly required for running the IBM PAIRS
## Jupyter notebook for IBM PAIRS tutorial
RUN apk add \
libpng-dev \
freetype-dev
RUN pip3 install \
jupyter \
urllib3 \
urlparse3 \
matplotlib
## install tools for development
RUN pip3 install \
responses
RUN apk add \
vim
# add IBM PAIRS to installation
RUN adduser -D ibmpairs
WORKDIR /home/ibmpairs
# add tutorials to the installation
COPY tutorials/* /home/ibmpairs
# add the IBM PAIRS open-source code
COPY ibmpairs /home/ibmpairs/ibmpairs
# set correct permissions
RUN chown ibmpairs:ibmpairs /home/ibmpairs/*
# start python environment as Jupyter notebook
EXPOSE 18380:18380
ENTRYPOINT su -c "\
jupyter notebook \
--ip 0.0.0.0 \
--port 18380 \
--no-browser \
--NotebookApp.token='' \
" ibmpairs