OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
852 stars 309 forks source link

[Bug] RuntimeError: The grass Python package is missing. Is the installation of GRASS GIS complete? #4267

Open geografin opened 2 months ago

geografin commented 2 months ago

Describe the bug

RuntimeError while pulling and running docker image for grass as FROM osgeo/grass-gis:main-debian

To reproduce

  1. Make a dockerfile with image osgeo/grass-gis:main-debian
  2. Run docker with any commands
  3. See error "/usr/local/bin/grass" in in find_grass_python_package raise RuntimeError: The grass Python package is missing. Is the installation of GRASS GIS complete?

Expected behavior

Screenshots

System description

Additional context

neteler commented 2 months ago

We need a bit more or detail. What exactly did you do?

In my local test it does not show any error:

podman run -it --rm osgeo/grass-gis:main-debian bash

root@4ce9b21e7b79:/grassdb# grass --version
GRASS GIS 8.5.0dev
...
nilason commented 2 months ago

The docker runner on main also fails, perhaps related: https://github.com/OSGeo/grass/actions/runs/10666197689/job/29564780184.

echoix commented 2 months ago

The rerun also failed...

echoix commented 2 months ago

We need a bit more or detail. What exactly did you do?

In my local test it does not show any error:


podman run -it --rm osgeo/grass-gis:main-debian bash

root@4ce9b21e7b79:/grassdb# grass --version

GRASS GIS 8.5.0dev

...

What it pulled again recently on your side? I don't see a precise version number in that

neteler commented 2 months ago

The docker runner on main also fails, perhaps related: https://github.com/OSGeo/grass/actions/runs/10666197689/job/29564780184.

Attempt for fix in #4268

neteler commented 2 months ago

What it pulled again recently on your side? I don't see a precise version number in that

Yes, today:

podman pull osgeo/grass-gis:main-debian
Trying to pull docker.io/osgeo/grass-gis:main-debian...
Getting image source signatures
Copying blob 9098eca3ffa5 skipped: already exists  
...
Copying blob 709b67ad17a3 skipped: already exists  
Copying blob 2cc3ae149d28 skipped: already exists  
Copying config f5982b34b3 done   | 
Writing manifest to image destination
f5982b34b3cac07d53caa87c45c221d33190bb429cc6e42ee125047a553694a0
neteler commented 2 months ago

I don't see a precise version number in that

Okay - to be sure I have now built it locally:

podman build --file docker/debian/Dockerfile .

... no errors.

Using it:

podman run -it --rm 0fc8437927ae1419cda267eb5da632b212e5a5fa7758a73cb63400b3916a8014 grass 
Starting GRASS GIS...
WARNING: It appears that the X Windows system is not active.
A graphical based user interface is not supported.
(DISPLAY variable is not set.)
Switching to text based interface mode.

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 8.5.0dev (0661212)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Bash Shell (/bin/bash)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
Start the GUI with:                      g.gui wxpython
When ready to quit enter:                exit

GRASS world_latlong_wgs84/PERMANENT:grassdb > g.version -g
version=8.5.0dev
date=2024
revision=0661212
build_date=2024-09-02
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8

GRASS world_latlong_wgs84/PERMANENT:grassdb > cat /etc/issue
Debian GNU/Linux 12 \n \l

Note: The message Switching to text based interface mode. is as expected since no GUI support it in this Debian based Dockerfile.

So, seems to run as expected.

@geografin please upload your Dockerfile for inspection.

geografin commented 2 months ago

Yes, of course. It's very simple. FROM osgeo/grass-gis:main-debian WORKDIR /app COPY . /app ENTRYPOINT ["bash", "init_grass.sh"] For now I am using 8.4 version on Debian and it works fine!