forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: update of Debian image (OSGeo#2769)
* docker: update of Debian image - Debian docker base image update * PDAL compilation: WITH_LASZIP=OFF, keep only WITH_LAZPERF=ON - new versions: | Base image | GRASS GIS | PROJ | GDAL | PDAL | Python | Image size | |--------------|------------|-------|-------|-------|--------|------------| | Debian 11 | 8.3.dev | 7.2.1 | 3.2.2 | 2.4.3 | 3.9.2 | 2.93 GB | |--------------|------------|-------|-------|-------|--------|------------| TODO in a separate PR: reduce image size
- Loading branch information
Showing
2 changed files
with
20 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
FROM debian:10.1 | ||
FROM debian:stable | ||
# currently Debian 11 | ||
|
||
# docker run -it --rm debian:stable bash | ||
# apt-get update && apt-get install lsb-release -y && lsb_release -a | ||
|
||
LABEL authors="Carmen Tawalika,Markus Neteler,Anika Weinmann" | ||
LABEL maintainer="[email protected],[email protected],[email protected]" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# define versions to be used | ||
ARG PDAL_VERSION=1.8.0 | ||
ARG PROJ_VERSION=5.2.0 | ||
ARG PROJ_DATUMGRID_VERSION=1.8 | ||
ARG LAZ_PERF_VERSION=1.3.0 | ||
# define versions to be used (PDAL is not available on Debian, so we compile it here) | ||
# https://github.com/PDAL/PDAL/releases | ||
ARG PDAL_VERSION=2.4.3 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
|
@@ -47,6 +49,7 @@ RUN apt-get update && apt-get upgrade -y && \ | |
libopenjp2-7-dev \ | ||
libpnglite-dev \ | ||
libpq-dev \ | ||
libproj-dev \ | ||
libpython3-all-dev \ | ||
libsqlite3-dev \ | ||
libtiff-dev \ | ||
|
@@ -57,6 +60,8 @@ RUN apt-get update && apt-get upgrade -y && \ | |
moreutils \ | ||
ncurses-bin \ | ||
netcdf-bin \ | ||
proj-bin \ | ||
proj-data \ | ||
python3 \ | ||
python3-dateutil \ | ||
python3-dev \ | ||
|
@@ -79,31 +84,6 @@ RUN apt-get update && apt-get upgrade -y && \ | |
RUN echo LANG="en_US.UTF-8" > /etc/default/locale | ||
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen | ||
|
||
## install a more recent projection library for GRASS GIS | ||
WORKDIR /src | ||
RUN wget -q http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz && \ | ||
tar xzf proj-${PROJ_VERSION}.tar.gz && \ | ||
cd /src/proj-${PROJ_VERSION}/ && \ | ||
wget -q http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \ | ||
cd nad && \ | ||
unzip ../proj-datumgrid-${PROJ_DATUMGRID_VERSION}.zip && \ | ||
cd .. && \ | ||
./configure --prefix=/usr/ && \ | ||
make && \ | ||
make install | ||
|
||
## install laz-perf | ||
RUN apt-get install cmake | ||
WORKDIR /src | ||
RUN wget -q https://github.com/hobu/laz-perf/archive/${LAZ_PERF_VERSION}.tar.gz -O laz-perf-${LAZ_PERF_VERSION}.tar.gz && \ | ||
tar -zxf laz-perf-${LAZ_PERF_VERSION}.tar.gz && \ | ||
cd laz-perf-${LAZ_PERF_VERSION} && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make && \ | ||
make install | ||
|
||
## fetch vertical datums for PDAL and store into PROJ dir | ||
WORKDIR /src | ||
RUN mkdir vdatum && \ | ||
|
@@ -120,7 +100,7 @@ RUN mkdir vdatum && \ | |
cd .. && \ | ||
rm -rf vdatum | ||
|
||
## install pdal | ||
## compile and install PDAL (not available on Debian/Ubuntu) with laz-perf enabled | ||
ENV NUMTHREADS=4 | ||
WORKDIR /src | ||
RUN wget -q \ | ||
|
@@ -143,10 +123,10 @@ RUN wget -q \ | |
-DHEXER_INCLUDE_DIR=/usr/include/ \ | ||
-DBUILD_PLUGIN_NITF=OFF \ | ||
-DBUILD_PLUGIN_ICEBRIDGE=ON \ | ||
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \ | ||
-DBUILD_PLUGIN_PGPOINTCLOUD=OFF \ | ||
-DBUILD_PGPOINTCLOUD_TESTS=OFF \ | ||
-DBUILD_PLUGIN_SQLITE=ON \ | ||
-DWITH_LASZIP=ON \ | ||
-DWITH_LASZIP=OFF \ | ||
-DWITH_LAZPERF=ON \ | ||
-DWITH_TESTS=ON && \ | ||
make -j $NUMTHREADS && \ | ||
|
@@ -156,6 +136,8 @@ RUN wget -q \ | |
WORKDIR /src | ||
COPY . /src/grass_build/ | ||
WORKDIR /src/grass_build | ||
# Cleanup potentially leftover GISRC file with wrong path to "demolocation" | ||
RUN rm -f /src/grass_build/dist.*/demolocation/.grassrc* | ||
|
||
# Set environmental variables for GRASS GIS compilation, without debug symbols | ||
# Set gcc/g++ environmental variables for GRASS GIS compilation, without debug symbols | ||
|
@@ -239,6 +221,7 @@ COPY docker/testdata/test_grass_session.py . | |
## just scan the LAZ file | ||
# Not yet ready for GRASS GIS 8: | ||
#RUN /usr/bin/python3 /scripts/test_grass_session.py | ||
# test LAZ file | ||
RUN grass --tmp-location EPSG:25832 --exec r.in.pdal input="/tmp/simple.laz" output="count_1" method="n" resolution=1 -g | ||
|
||
WORKDIR /grassdb | ||
|