-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile_k4a
133 lines (117 loc) · 3.38 KB
/
Dockerfile_k4a
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-c"]
ENV GRASS_RELEASE=8.2.0
ENV NUMTHREADS=4
WORKDIR /src
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
bison \
bzip2 \
cmake \
curl \
flex \
g++ \
gcc \
gdal-bin \
git \
language-pack-en-base \
libbz2-dev \
libcairo2 \
libcairo2-dev \
libcurl4-gnutls-dev \
libfftw3-bin \
libfftw3-dev \
libfreetype6-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libjpeg-dev \
libjsoncpp-dev \
libnetcdf-dev \
libncurses5-dev \
libopenblas-base \
libopenblas-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpnglite-dev \
libpq-dev \
libpython3-all-dev \
libsqlite3-dev \
libtiff-dev \
libzstd-dev \
locales \
make \
mesa-common-dev \
moreutils \
ncurses-bin \
netcdf-bin \
python3 \
python3-dateutil \
python3-dev \
python3-magic \
python3-numpy \
python3-pil \
python3-pip \
python3-ply \
python3-setuptools \
python3-venv \
software-properties-common \
sqlite3 \
subversion \
unzip \
vim \
wget \
zip \
zlib1g-dev \
mesa-common-dev libglu1-mesa-dev \
libpdal-dev
# download wxPython4 binary
RUN pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
# Configure compile and install GRASS GIS
RUN git clone --depth=1 --branch $GRASS_RELEASE https://github.com/OSGeo/grass.git
ENV GRASS_PYTHON=/usr/bin/python3
WORKDIR /src/grass
RUN /src/grass/configure \
--with-cxx \
--enable-largefile \
--with-proj --with-proj-share=/usr/share/proj \
--with-gdal=/usr/bin/gdal-config \
--with-geos \
--with-sqlite \
--with-cairo --with-cairo-ldflags=-lfontconfig \
--with-freetype --with-freetype-includes="/usr/include/freetype2/" \
--with-fftw \
--with-netcdf \
--with-zstd \
--with-bzlib \
--with-pdal \
--without-mysql \
--without-odbc \
--with-openmp \
--without-ffmpeg \
--with-opengl-libs=/usr/include/GL \
&& make -j $NUMTHREADS \
&& make install
# PCL
ENV PCL_RELEASE=1.11.0
WORKDIR /src
RUN git clone --depth=1 --branch pcl-$PCL_RELEASE https://github.com/PointCloudLibrary/pcl.git
RUN apt-get install -y --no-install-recommends --no-install-suggests libeigen3-dev libflann-dev
WORKDIR /src/pcl
RUN mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j$NUMTHREADS && \
make -j2 install
# K4A
RUN curl -sSL https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/libk/libk4a1.4/libk4a1.4_1.4.1_amd64.deb > /tmp/libk4a1.4_1.4.1_amd64.deb
RUN curl -sSL https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/libk/libk4a1.4-dev/libk4a1.4-dev_1.4.1_amd64.deb > /tmp/libk4a1.4-dev_1.4.1_amd64.deb
RUN echo 'libk4a1.4 libk4a1.4/accepted-eula-hash string 0f5d5c5de396e4fee4c0753a21fee0c1ed726cf0316204edda484f08cb266d76' | debconf-set-selections
RUN echo 'libk4a1.4 libk4a1.4/accept-eula select true' | debconf-set-selections
RUN dpkg -i /tmp/libk4a1.4_1.4.1_amd64.deb
RUN dpkg -i /tmp/libk4a1.4-dev_1.4.1_amd64.deb
# r.in.kinect
WORKDIR /src
RUN git clone --single-branch --branch k4a https://github.com/tangible-landscape/r.in.kinect.git
WORKDIR /src/r.in.kinect
RUN make MODULE_TOPDIR=../grass && make install MODULE_TOPDIR=../grass