Skip to content

Commit 2ea8762

Browse files
committed
Add a daunnc/pdal-mbio image Dockerfile with installed MB-System
1 parent 8454f1a commit 2ea8762

File tree

1 file changed

+328
-0
lines changed

1 file changed

+328
-0
lines changed
Lines changed: 328 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,328 @@
1+
FROM ubuntu:bionic
2+
MAINTAINER Grigory Pomadchin <[email protected]>
3+
4+
ENV CC gcc
5+
ENV CXX g++
6+
7+
RUN dpkg --add-architecture i386
8+
RUN apt-get update -y
9+
RUN apt-get install -y wget
10+
RUN apt-get install -y xorg-dev
11+
RUN apt-get install -y libxm4:i386 libuil4:i386 libmrm4:i386 libxm4 libuil4 libmrm4
12+
RUN apt-get install -y libmotif-common libmotif-dev libgl1-mesa-dev libglu1-mesa-dev
13+
RUN apt-get install -y mesa-common-dev libfftw3-3 gfortran libfftw3-dev
14+
15+
RUN apt-get update -qq; \
16+
apt-get -qq remove postgis; \
17+
apt-get install -y --fix-missing --no-install-recommends \
18+
software-properties-common
19+
20+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \
21+
build-essential \
22+
ca-certificates \
23+
cmake \
24+
curl \
25+
gfortran \
26+
git \
27+
libgeotiff-dev \
28+
libarpack2-dev \
29+
libflann-dev \
30+
libhdf5-serial-dev \
31+
liblapack-dev \
32+
libtiff5-dev \
33+
openssh-client \
34+
python3-dev \
35+
python3-numpy \
36+
wget \
37+
automake \
38+
libtool \
39+
libspatialite-dev \
40+
libsqlite3-mod-spatialite \
41+
libhdf5-dev \
42+
libjsoncpp-dev \
43+
libboost-filesystem1.65-dev \
44+
libboost-iostreams1.65-dev \
45+
libboost-program-options1.65-dev \
46+
libboost-system1.65-dev \
47+
libboost-thread1.65-dev \
48+
clang \
49+
libproj-dev \
50+
libc6-dev \
51+
libnetcdf-dev \
52+
libpng-dev \
53+
libjpeg-dev \
54+
libgif-dev \
55+
libwebp-dev \
56+
libhdf4-alt-dev \
57+
libhdf5-dev \
58+
unixodbc-dev \
59+
libsqlite3-dev \
60+
libltdl-dev \
61+
libcurl4-openssl-dev \
62+
libspatialite-dev \
63+
cython \
64+
python3-pip \
65+
time \
66+
ninja-build \
67+
python3-setuptools \
68+
unzip \
69+
libeigen3-dev \
70+
libxml2-dev \
71+
libssl-dev \
72+
liblzma-dev \
73+
libzstd1-dev \
74+
pkg-config \
75+
libgdal-dev \
76+
bash-completion
77+
78+
RUN apt-get install -y libnetcdf-dev netcdf-bin libproj12 libproj-dev gdal-bin libgdal-dev
79+
80+
# Follow http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT
81+
RUN apt-get install -y subversion cmake
82+
RUN mkdir /gmt && cd /gmt && wget ftp://ftp.soest.hawaii.edu/gshhg/legacy/gshhg-gmt-2.3.6.tar.gz && tar xvzf gshhg-gmt-2.3.6.tar.gz && rm gshhg-gmt-2.3.6.tar.gz
83+
RUN cd /gmt && wget ftp://ftp.soest.hawaii.edu/dcw/dcw-gmt-1.1.2.tar.gz && tar xvzf dcw-gmt-1.1.2.tar.gz && rm dcw-gmt-1.1.2.tar.gz
84+
RUN cd /gmt && svn checkout svn://gmtserver.soest.hawaii.edu/gmt5/trunk gmt5-dev && cd /gmt/gmt5-dev && export CMAKE_INSTALL_PREFIX=/opt/gmt && export GSHHG_ROOT=/gmt/gshhg-gmt-2.3.6 && export DCW_ROOT=/gmt/dcw-gmt-1.1.2 && mkdir build && cd build && cmake .. && make && make install
85+
86+
# RUN wget ftp://ftp.ldeo.columbia.edu/pub/MB-System/MB-System.tar.gz && tar xvzf MB-System.tar.gz && rm MB-System.tar.gz
87+
RUN apt-get install -y git
88+
RUN git clone https://github.com/dwcaress/MB-System.git && cd /MB-System && chmod 777 ./configure && ./configure && make && make install
89+
90+
ARG PDAL_VERSION=1.8-maintenance
91+
ARG DESTDIR="/build"
92+
ARG tiledb_version=1.4.1
93+
94+
RUN git clone https://github.com/LASzip/LASzip.git laszip; \
95+
cd laszip; \
96+
git checkout 3.1.1; \
97+
cmake \
98+
-G Ninja \
99+
-DCMAKE_INSTALL_PREFIX=/usr/ \
100+
-DCMAKE_BUILD_TYPE="Release" \
101+
. ; \
102+
ninja ; \
103+
ninja install; \
104+
DESTDIR=/ ninja install; \
105+
rm -rf laszip
106+
107+
RUN git clone https://github.com/hobu/laz-perf.git; \
108+
cd laz-perf; \
109+
mkdir build; \
110+
cd build; \
111+
cmake .. \
112+
-G Ninja \
113+
-DCMAKE_INSTALL_PREFIX=/usr \
114+
-DCMAKE_BUILD_TYPE="Release" \
115+
; \
116+
ninja; \
117+
ninja install; \
118+
DESTDIR=/ ninja install; \
119+
rm -rf /laz-perf
120+
121+
122+
RUN mkdir /nitro; cd /nitro; \
123+
git clone https://github.com/hobu/nitro; \
124+
cd nitro; \
125+
mkdir build; \
126+
cd build; \
127+
cmake ..\
128+
-G Ninja -DCMAKE_INSTALL_PREFIX=/usr/ \
129+
; \
130+
ninja; \
131+
ninja install; \
132+
DESTDIR=/ ninja install; \
133+
rm -rf /nitro
134+
135+
RUN git clone --depth 1 --branch v0.4.6 https://github.com/gadomski/fgt.git \
136+
&& cd fgt \
137+
&& cmake . \
138+
-DWITH_TESTS=OFF \
139+
-DBUILD_SHARED_LIBS=ON \
140+
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 \
141+
-DCMAKE_INSTALL_PREFIX=/usr \
142+
-DCMAKE_BUILD_TYPE=Release \
143+
-G "Ninja" \
144+
&& ninja \
145+
&& ninja install \
146+
&& DESTDIR=/ ninja install \
147+
&& rm -rf /fgt
148+
149+
RUN git clone --depth 1 --branch v0.5.1 https://github.com/gadomski/cpd.git \
150+
&& cd cpd \
151+
&& cmake . \
152+
-DWITH_TESTS=OFF \
153+
-DWITH_JSONCPP=OFF \
154+
-DWITH_FGT=ON \
155+
-DCMAKE_SYSTEM_PREFIX_PATH="${DESTDIR}/usr" \
156+
-DCMAKE_CXX_FLAGS="-isystem ${DESTDIR}/usr/include" \
157+
-DWITH_STRICT_WARNINGS=OFF \
158+
-DWITH_DOCS=OFF \
159+
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 \
160+
-DBUILD_SHARED_LIBS=ON \
161+
-DCMAKE_INSTALL_PREFIX=/usr \
162+
-DCMAKE_BUILD_TYPE=Release \
163+
-G "Ninja" \
164+
&& ninja \
165+
&& ninja install \
166+
&& DESTDIR=/ ninja install \
167+
&& rm -rf /cpd
168+
169+
#RUN \
170+
# wget https://github.com/TileDB-Inc/TileDB/archive/${tiledb_version}.tar.gz; \
171+
# tar xzf ${tiledb_version}.tar.gz; \
172+
# rm ${tiledb_version}.tar.gz; \
173+
# cd TileDB-${tiledb_version}; \
174+
# mkdir build; \
175+
# cd build; \
176+
# ../bootstrap --prefix=/usr --enable-s3; \
177+
# make -j2; \
178+
# make install-tiledb; \
179+
# DESTDIR=/ make install-tiledb; \
180+
# cd /; \
181+
# rm -rf TileDB-${tiledb_version};
182+
183+
RUN git clone --depth 1 --branch ${PDAL_VERSION} https://github.com/PDAL/PDAL.git pdal-git; \
184+
cd pdal-git; \
185+
mkdir build;\
186+
cd build; \
187+
cmake .. \
188+
-G Ninja \
189+
-DCMAKE_INSTALL_PREFIX=/usr/ \
190+
-DBUILD_PLUGIN_CPD=ON \
191+
-DBUILD_PLUGIN_MBIO=ON \
192+
-DBUILD_PLUGIN_GREYHOUND=ON \
193+
-DBUILD_PLUGIN_I3S=ON \
194+
-DBUILD_PLUGIN_HEXBIN=ON \
195+
-DBUILD_PLUGIN_ICEBRIDGE=ON \
196+
-DBUILD_PLUGIN_MRSID=OFF \
197+
-DBUILD_PLUGIN_NITF=ON \
198+
-DBUILD_PLUGIN_OCI=OFF \
199+
-DBUILD_PLUGIN_PCL=OFF \
200+
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
201+
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
202+
-DBUILD_PLUGIN_SQLITE=ON \
203+
-DBUILD_PLUGIN_RIVLIB=OFF \
204+
-DBUILD_PLUGIN_PYTHON=ON \
205+
-DBUILD_PLUGIN_TILEDB=OFF \
206+
-DENABLE_CTEST=OFF \
207+
-DWITH_LAZPERF=ON \
208+
-DWITH_LASZIP=ON \
209+
-DWITH_ZSTD=ON \
210+
-DWITH_ZLIB=ON \
211+
-DWITH_TESTS=OFF \
212+
-DWITH_PDAL_JNI=OFF \
213+
-DCMAKE_BUILD_TYPE=Release \
214+
; \
215+
ninja; \
216+
ninja install; \
217+
DESTDIR=/ ninja install; \
218+
rm -rf /pdal-git
219+
220+
#
221+
# Haru hasn't been updated for years. This tag is the head.
222+
#
223+
RUN git clone https://github.com/libharu/libharu \
224+
&& cd libharu \
225+
&& git checkout d84867ebf9f3de6afd661d2cdaff102457fbc371 \
226+
&& mkdir build \
227+
&& cd build \
228+
&& cmake \
229+
-G Ninja \
230+
-DCMAKE_INSTALL_PREFIX=/usr/ \
231+
-DCMAKE_BUILD_TYPE=Release \
232+
-DCMAKE_PREFIX_PATH:FILEPATH="${DESTDIR}" \
233+
-DCMAKE_SYSTEM_PREFIX_PATH="${DESTDIR}/usr" \
234+
-DCMAKE_CXX_FLAGS="-isystem ${DESTDIR}/usr/include" \
235+
..; \
236+
ninja; \
237+
ninja install; \
238+
DESTDIR=/ ninja install; \
239+
rm -rf /libharu
240+
241+
RUN git clone https://github.com/PDAL/PRC \
242+
&& cd PRC \
243+
&& mkdir build \
244+
&& cd build \
245+
&& CXXFLAGS="-fno-stack-protector" CFLAGS="-fno-stack-protector" cmake \
246+
-DCMAKE_INSTALL_PREFIX=/usr/ \
247+
-DPDAL_DIR="/usr/lib/pdal/cmake" \
248+
-DCMAKE_BUILD_TYPE=Release .. \
249+
-G "Ninja" \
250+
&& ninja \
251+
&& ninja install \
252+
&& DESTDIR=/ ninja install \
253+
&& rm -rf /PRC
254+
255+
256+
257+
RUN \
258+
git clone https://github.com/pubgeo/pubgeo.git \
259+
&& cd pubgeo \
260+
&& mkdir build \
261+
&& cd build \
262+
&& CXXFLAGS="-fno-stack-protector" CFLAGS="-fno-stack-protector" cmake \
263+
-DCMAKE_INSTALL_PREFIX=/usr/ \
264+
-DPDAL_DIR="/usr/lib/pdal/cmake" \
265+
-DCMAKE_BUILD_TYPE=Release .. \
266+
-G "Ninja" \
267+
&& ninja \
268+
&& ninja install \
269+
&& DESTDIR=/ ninja install \
270+
&& rm -rf /pubgeo
271+
272+
# FROM ubuntu:bionic as runner
273+
274+
RUN apt-get update; \
275+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
276+
sudo curl \
277+
vim unzip \
278+
unixodbc \
279+
libgeotiff2 \
280+
libgeotiff-epsg \
281+
libexpat1 \
282+
libxml2 \
283+
libjsoncpp1 \
284+
libwebp6 \
285+
netcdf-bin \
286+
libhdf4-0-alt \
287+
libgif7 \
288+
libdapclient6v5 \
289+
libspatialite7 \
290+
libsqlite3-mod-spatialite \
291+
spatialite-bin \
292+
libtiff5 \
293+
libflann1.9 \
294+
libssl1.1 \
295+
libpython2.7 \
296+
libproj-dev \
297+
proj-bin \
298+
gdal-bin \
299+
proj-data \
300+
zlib1g \
301+
libpng16-16 \
302+
python3-setuptools \
303+
liblzma5 \
304+
libzstd1 \
305+
libhdf5-cpp-100
306+
307+
RUN date
308+
309+
# COPY --from=builder /build/usr/bin/ /usr/bin/
310+
# COPY --from=builder /build/usr/lib/ /usr/lib/
311+
# COPY --from=builder /build/usr/include/ /usr/include/
312+
313+
RUN \
314+
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-1.8.zip && unzip -j -u -o proj-datumgrid-1.8.zip -d /usr/share/proj; \
315+
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-europe-1.2.zip && unzip -j -u -o proj-datumgrid-europe-1.2.zip -d /usr/share/proj; \
316+
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-oceania-1.0.zip && unzip -j -u -o proj-datumgrid-oceania-1.0.zip -d /usr/share/proj; \
317+
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-world-1.0.zip && unzip -j -u -o proj-datumgrid-world-1.0.zip -d /usr/share/proj; \
318+
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-north-america-1.2.zip && unzip -j -u -o proj-datumgrid-north-america-1.2.zip -d /usr/share/proj;
319+
320+
RUN set -ex && \
321+
apt update -y && \
322+
apt install \
323+
openjdk-8-jdk \
324+
ca-certificates-java -y
325+
326+
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64
327+
328+

0 commit comments

Comments
 (0)