-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
73 lines (69 loc) · 2.48 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
# Run Orfeo Toolbox in a container [option to execute otb cli and gui commands]
#
# docker run -i -t \
# -v $HOME/Data:/home/data \ <- mounts data directory to container
# toddstavish/orfeo_toolbox \
# otb_cli_gui executable <- otb command and parameters [defaults to shell]
#
# GUI Dependencies: Linux -> -v /tmp/.X11-unix:/tmp/.X11-unix and -e DISPLAY=unix$DISPLAY
# OSX -> XQuartz and
# socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" and
# -e DISPLAY=192.168.99.1:0 <- this the default virtualbox ip address
#
# monteverdi2 mesa-utils xserver-xorg-video-all \
#
# one of the following two lines can be used below to select
# which repository to use.
# the 1st has otb version 5.4.0
# the 2nd has otb version 5.8.0
#
# add-apt-repository ppa:ubuntugis/ppa &&\
# add-apt-repository ppa:ubuntugis/ubuntugis-experimental &&\
#
FROM ubuntu:16.04
MAINTAINER Stephen Woodbridge <[email protected]>
RUN apt-get -qqy update &&\
apt-get -qqy install software-properties-common &&\
apt-get -qqy update &&\
add-apt-repository ppa:ubuntugis/ubuntugis-experimental &&\
apt-get -qqy update &&\
apt-get -qqy install \
gdal-bin \
imagemagick \
libotb \
libterm-readline-perl-perl \
locales-all \
monteverdi \
otb-bin \
otb-bin-qt \
python-setuptools \
python-pkg-resources \
python-gdal \
python-matplotlib \
python-matplotlib-data \
python-otb \
python-rasterio \
python-scipy \
python-sciscipy \
python-scitools \
python-simplejson \
python-skimage \
python-sklearn \
python-psycopg2 \
python-numpy \
rasterio \
sudo \
vim \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
sed -i 's/python3/python2/' /usr/bin/rasterio && \
echo "try:" >> /etc/python2.7/sitecustomize.py && \
echo " import sys" >> /etc/python2.7/sitecustomize.py && \
echo " sys.path.append('/usr/lib/otb/python')" >> /etc/python2.7/sitecustomize.py && \
echo "except:" >> /etc/python2.7/sitecustomize.py && \
echo " pass" >> /etc/python2.7/sitecustomize.py && \
python -c 'from skimage import io'
ENTRYPOINT
CMD ["/bin/bash"]