[GRASS-user] Status of ITZI in GRASS?

Venka venka.osgeo at gmail.com
Thu Sep 5 16:44:53 PDT 2024


On 9/6/2024 4:49 AM, Thomas Adams wrote:
> Hi Venka,
> 
> I finally got time to run through your procedure -- thank you so much for
> this! But, if I understand correctly, this only works within a docker
> environment; is this correct?

Yes you need to install docker and run the commands in docker shell.

What is the Operating system you are using? Windows?
If so, you should install Ubuntu (or other Linux distributions)
using WSL [1].

You could also try the itzi tutorial on command line.

[1] https://learn.microsoft.com/en-us/windows/wsl/install



> 
> I was able to successfully get through Step (d). However, the GRASS GUI
> never launched and the process you provided installed GRASS 8.4, again,
> within the docker environment. I was unable to work through the ITZI
> tutorial due to these issues. I don't think this is a workable solution for
> me. But, thank you!
> 
> Regards,
> Tom
> 
> On Tue, Sep 3, 2024 at 12:38 AM Venka <venka.osgeo at gmail.com> wrote:
> 
>> Hi Thomas,
>>
>> Some progress here in building a docker image with GRASS and itzi.
>> First of all, Thanks to Gérald and Markus for helping out with
>> this.
>>
>> My experiment was done using Ubuntu_22.04 machine
>>
>> a) Install docker
>>
>>   > sudo apt-get update
>>   > sudo apt-get install docker-ce docker-ce-cli containerd.io
>> docker-buildx-plugin docker-compose-plugin
>>
>> b) use my Dockerfile (attached) to build the Docker image
>>
>>   > sudo docker build . -t itzi:grass_8_4_gui
>>
>> It gave no compilation error for itzi
>>
>> c) Run the Docker image
>>
>>   > sudo docker run -it --rm --volume="$(pwd)/:/data"
>> --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --env DISPLAY=$DISPLAY
>> --device="/dev/dri/card0:/dev/dri/card0" itzi:grass_8_4_gui grass --gui
>>
>> d) Verify itzi version on GRASS command line
>>
>>   > itzi version
>>
>> e) Test the itzi tutorial at https://www.itzi.org/user-manual/
>>
>> I have not run the entire tutorial but I guess it should work.
>> If you succeed with running the entire tutorial, let us know
>>
>> Best
>>
>> Venka
>>
>> P.S. Could be useful if grass_with_itzi image is made available on
>> https://grass.osgeo.org/download/docker/
>>
>>
>>
>>
>>
>>
>>
>>
>> On 8/1/2024 4:26 AM, Thomas Adams wrote:
>>> Hi all;
>>>
>>> I have tried both approaches suggested by Venka and Markus and keep
>> getting
>>> errors; I have:
>>>
>>> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
>>>
>>> and I get this:
>>> cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx
>>> /usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A
>> NumPy
>>> version >=1.17.3 and <1.25.0 is required for this version of SciPy
>>> (detected version 2.0.0
>>>
>>> I also have to use python3 not python in...
>>>
>>> python setup.py build
>>>
>>> Also, when I tried the approach suggested by Venka using conda, this
>> messed
>>> up my GRASS installation with wxpython and the GUI would not launch. So,
>> I
>>> had to remove conda and install wxpython
>>>
>>> A couple of years ago with a different Linux system and Itzi installed
>>> fine, so this is quite frustrating
>>>
>>> Tom
>>>
>>> On Thu, Jun 13, 2024 at 8:19 PM Venka via grass-user <
>>> grass-user at lists.osgeo.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> Thanks to Markus and Song for their feedback.
>>>>
>>>> We succeeded in installing ITZI on Ubuntu 22.04
>>>>
>>>> Steps to install GRASS and ITZI are as below;
>>>>
>>>> --------------------------------------
>>>>
>>>> ############ Install GRASS
>>>> #adding GRASS repository  into ubuntu22.04
>>>> #https://grass.osgeo.org/download/linux/#GRASS-GIS-current
>>>> sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
>>>> sudo apt update
>>>>
>>>> #installing GRASS 8.3.2
>>>> sudo apt-get install grass
>>>> sudo apt-get install grass
>>>> #check grass well-done?
>>>> grass -v
>>>> grass -h
>>>>
>>>>
>>>> ########### Python virtual environment
>>>> conda info --envs
>>>> #conda create --name py38venka python=3.8
>>>> conda create --name py310venka python=3.10
>>>> conda activate py310venka
>>>> conda info --envs
>>>>
>>>>
>>>> ############installing itzi
>>>> #
>>>>
>> https://itzi.readthedocs.io/en/latest/installation.html#installation-on-gnu-linux
>>>>
>>>> #numpy required
>>>> conda install -c conda-forge pysal rioxarray cartopy
>>>>
>>>> #cython, setuptools required
>>>> conda install -c conda-forge setuptools cython
>>>>
>>>> #Compiling itzi first
>>>> unzip itzi-20.5.zip
>>>> cd itzi-master
>>>>
>>>> cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx
>>>> python setup.py build
>>>> python setup.py install
>>>>
>>>> --------------------------------------
>>>>
>>>> Best,
>>>>
>>>> Venka
>>>>
>>>>
>>>>
>>>>
>>>> On 6/14/2024 1:55 AM, Markus Neteler via grass-user wrote:
>>>>> Hi,
>>>>>
>>>>> FWIW, I was able to compile ITZI today on Fedora 39 (gcc version
>>>>> 13.3.1 20240522; Python 3.12.3), using
>>>>>
>>>>> # install dependencies
>>>>> pip install numpy setuptools cython
>>>>>
>>>>> # generate some needed C files
>>>>> cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx
>>>>>
>>>>> # build
>>>>> python setup.py build
>>>>>
>>>>> # install
>>>>> python setup.py install --user
>>>>>
>>>>> # test if it starts
>>>>> itzi version
>>>>> 20.5
>>>>>
>>>>> # pytest (see docs/prog_manual.rst)
>>>>> pytest -v
>>>>> [...]
>>>>>
>>>>> Due to lack of time I could not continue yet.
>>>>>
>>>>> Perhaps I can try these days during the
>>>>> https://grasswiki.osgeo.org/wiki/GRASS_Community_Meeting_Prague_2024
>>>>>
>>>>> Best
>>>>> Markus
>>>>>
>>>>> --
>>>>> Markus Neteler, PhD
>>>>> https://www.mundialis.de - company
>>>>> https://grass.osgeo.org - FOSS
>>>>> https://neteler.org - freelancing & blog
>>>>> _______________________________________________
>>>>> grass-user mailing list
>>>>> grass-user at lists.osgeo.org
>>>>> https://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> grass-user at lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>
>>>
>>> --
>>>
>>
> 
> 



More information about the grass-user mailing list