3liz/py-qgis-wps

Update docker image OS

IceflowRE opened this issue · 5 comments

Would it be possible to update the underlying debian to something more new?
Or provide an ubuntu image?

If i try to add other software like GDAL, i always run into trouble with oudated packages.

Would it be possible to update the underlying debian to something more new?

What do you suggest ? Which packages cause you troubles ?

We try to provide the latest Debian/Ubuntu bases images for which we have the latest Qgis LTR/Releases package availables. This may change according to some package versions provided but it still a Deboan compatible distro.

You may build your own base image according to your needs from https://github.com/3liz/docker-qgis-platform

The current image is based on Debian Bullseye, I tried to install GDAL, but either i have to use version 3.2.2, which is nearly 2 1/2 years old or i have to install the current version from unstable (which is not the problem), but this depends on Python 3.11 and current qgis-pywps is not compatible with Python 3.11.

Thanks for the hint with the qgis platform, i will try to use that and install the server myself, which i wanted to avoid initially.

I tried to install GDAL, but either i have to use version 3.2.2

Qgis is installed from official packages which ensure you compatibility with the provided Gdal from the distro. If you are installing another version of GDAL you may run into compatibility issues.
3.2.2
The safest way is to build GDAL with the new version of gdal and use it as base image for 3.2.2

and current qgis-pywps is not compatible with Python 3.11.

Did you run into issues with Python 3.11 ?

In all cases if pyQgis is not compiled against Python 3.11 qgis-pywps will not work with Python 3.11 since it is based on pyQgis.

I tried to install GDAL, but either i have to use version 3.2.2

Qgis is installed from official packages which ensure you compatibility with the provided Gdal from the distro. If you are installing another version of GDAL you may run into compatibility issues. 3.2.2 The safest way is to build GDAL with the new version of gdal and use it as base image for 3.2.2

QGIS is compatible with all GDAL versions above 3.2.0.
The Debian PythonQGIS package requires a lower python version, even if it would support 3.11. I would have to install qgis myself.

I will stick to 3.2.2. Its not worth the hustle.

This was my attempt:

# adapted from https://github.com/3liz/py-qgis-wps/blob/master/docker/Dockerfile
# commit: 604eaa8c2ad985b9e51147e5b8da7692c754903e
ARG QGIS_VERSION=release

FROM 3liz/qgis-platform:3.32

ARG BUILD_VERSION=1.8.6

########## CUSTOM ##########
# install GDAL
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& apt-add-repository "deb https://deb.debian.org/debian unstable main" \
&& apt-get update \
&& apt-get install -y g++ python3-dev gdal-bin=3.7.0+dfsg-1 libgdal-dev=3.7.0+dfsg-1 \
&& gdalinfo --version

RUN apt-get install -y python3-venv

########## CUSTOM ##########

RUN apt-get update && apt-get install -y --no-install-recommends gosu \
     python3-shapely  \
     python3-psutil \
     && apt-get clean  && rm -rf /var/lib/apt/lists/* \
     && rm -rf /usr/share/man 

# Create virtualenv for installing server
RUN mkdir -p /opt/local/ \
    && python3 -m venv --system-site-packages /opt/local/pyqgiswps && cd /usr/local/bin \
    && /opt/local/pyqgiswps/bin/pip install -U --no-cache-dir pip setuptools wheel \
    && /opt/local/pyqgiswps/bin/pip install --no-cache-dir \
        plotly \
        simplejson \
        geojson \
        scipy  \
        pandas \
        Jinja2 \
    && /opt/local/pyqgiswps/bin/pip install --no-cache-dir "py-qgis-wps==${BUILD_VERSION}" \
    && ln -s /opt/local/pyqgiswps/bin/wpsserver \
    && ln -s /opt/local/pyqgiswps/bin/wpsserver-check \
    && rm -rf /root/.cache /root/.ccache

COPY /docker-entrypoint.sh /
RUN chmod 0755 /docker-entrypoint.sh

EXPOSE 8080

ENTRYPOINT ["/docker-entrypoint.sh"]

########## CUSTOM ##########
# install python packages
COPY ./processing/gretas-wps/requirements.txt /tmp/
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal \
&& export C_INCLUDE_PATH=/usr/include/gdal \
&& /opt/local/pyqgiswps/bin/pip install -U --no-cache-dir gdal==3.7.0 \
&& /opt/local/pyqgiswps/bin/pip install -U --no-cache-dir -r /tmp/requirements.txt
########## CUSTOM ##########

We provide only images that are compatibles with official distribution and official dependencies in order to ensier ensure maximum stablitily.
If you need modification for install specific version of a givent package you may modify the Dockerfile as you wish but you are on your own: py-qgis-wps is a python package and can be installed from pypi.