Skip to content

Commit

Permalink
docker: update of Debian image
Browse files Browse the repository at this point in the history
(backport of #2769)

- 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.2.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
neteler committed Jan 22, 2023
1 parent 2810b69 commit 2f02099
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 52 deletions.
42 changes: 24 additions & 18 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/mundialis/grass-py3-pdal.svg)](https://grass.osgeo.org/download/software/docker-images/)
# GRASS GIS docker

## GRASS GIS docker matrix

# GRASS GIS docker matrix
[![Docker Pulls](https://img.shields.io/docker/pulls/mundialis/grass-py3-pdal.svg)](https://grass.osgeo.org/download/software/docker-images/)

| Base image | Docker tag | GRASS GIS | PROJ | GDAL | PDAL | Python | Image size |
|--------------|-----------------|------------|-------|-------|-------|--------|------------|
| Ubuntu 20.04 | latest-ubuntu | 8.3.dev | 6.3.1 | 3.0.4 | 2.2.0 | 3.8.10 | 1.20 GB |
| Debian 10.1 | latest-debian | 8.3.dev | 5.2.0 | 2.4.0 | 1.8.0 | 3.7.3 | 1.16 GB |
| Alpine 3.12 | latest-alpine | 8.3.dev | 7.0.1 | 3.1.4 | 2.1.0 | 3.8.10 | 186 MB |
|--------------|-----------------|------------|-------|-------|-------|--------|------------|
| Ubuntu 20.04 | stable-ubuntu | 8.2 branch | 6.3.1 | 3.0.4 | 2.2.0 | 3.8.10 | 1.20 GB |
| Debian 10.1 | stable-debian | 8.2 branch | 5.2.0 | 2.4.0 | 1.8.0 | 3.7.3 | 1.16 GB |
| Alpine 3.12 | stable-alpine | 8.2 branch | 7.0.1 | 3.1.4 | 2.1.0 | 3.8.10 | 186 MB |
<!-- markdownlint-disable line-length -->
| Base image | Docker tag | GRASS GIS | PROJ | GDAL | PDAL | Python | Image size |
|--------------|---------------|------------|-------|-------|-------|--------|------------|
| Ubuntu 20.04 | latest-ubuntu | 8.3.dev | 6.3.1 | 3.0.4 | 2.2.0 | 3.8.10 | 1.20 GB |
| Debian 11 | latest-debian | 8.3.dev | 7.2.1 | 3.2.2 | 2.4.3 | 3.9.2 | 2.93 GB |
| Alpine 3.12 | latest-alpine | 8.3.dev | 7.0.1 | 3.1.4 | 2.1.0 | 3.8.10 | 186 MB |
|--------------|---------------|------------|-------|-------|-------|--------|------------|
| Ubuntu 20.04 | stable-ubuntu | 8.2 branch | 6.3.1 | 3.0.4 | 2.2.0 | 3.8.10 | 1.20 GB |
| Debian 11 | stable-debian | 8.2 branch | 7.2.1 | 3.2.2 | 2.4.3 | 3.9.2 | 2.93 GB |
| Alpine 3.12 | stable-alpine | 8.2 branch | 7.0.1 | 3.1.4 | 2.1.0 | 3.8.10 | 186 MB |
<!-- markdownlint-enable line-length -->

Last update: 27 Apr 2022 (source: https://github.com/OSGeo/grass/actions/workflows/docker.yml and https://hub.docker.com/r/mundialis/grass-py3-pdal/tags)
Last update: 21 Jan 2023 (source: <https://github.com/OSGeo/grass/actions/workflows/docker.yml>
and <https://hub.docker.com/r/mundialis/grass-py3-pdal/tags>)

# Requirements
## Requirements

* docker or podman
* docker or podman

# Installation
## Installation

To install a docker image, run (replace `<tag>` with the desired Docker tag from the table above):
To install a docker image, run (replace `<tag>` with the desired Docker tag from
the table above):

```
```bash
docker pull mundialis/grass-py3-pdal:<tag>
```

See also: https://grass.osgeo.org/download/docker/
See also: <https://grass.osgeo.org/download/docker/>
51 changes: 17 additions & 34 deletions docker/debian/Dockerfile
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="tawalika@mundialis.de,neteler@mundialis.de,weinmann@mundialis.de"

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"]

Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 && \
Expand All @@ -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 \
Expand All @@ -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 && \
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docker/testdata/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Test data

Data source: <https://github.com/PDAL/PDAL/tree/master/test/data/laz/>

0 comments on commit 2f02099

Please sign in to comment.