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 <
[email protected]> 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
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
--
FROM osgeo/grass-gis:8.4.0-ubuntu_wxgui AS base
############installing itzi
#https://itzi.readthedocs.io/en/latest/installation.html#installation-on-gnu-linux
RUN mkdir -p ~/miniconda3 \
&& wget
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O
~/miniconda3/miniconda.sh \
&& bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 \
&& rm -rf ~/miniconda3/miniconda.sh \
&& ~/miniconda3/bin/conda init bash \
&& ls
#COPY --from=base /root/ /root/
RUN echo $PYTHONPATH \
&& export PATH=$PATH:~/miniconda3/bin/ \
&& grass -v \
&& source ~/.bashrc \
&& conda create --name py310venka python=3.10
RUN source ~/.bashrc \
&& export PATH=$PATH:~/miniconda3/bin/ \
&& conda install -y -c conda-forge pysal rioxarray cartopy setuptools
cython six \
&& curl -o /tmp/itzi-20.5.tar.gz \
https://files.pythonhosted.org/packages/61/e2/de2daf2437ff4006d809a9cf75ad7a55005719539a858712d908d0a540d7/itzi-20.5.tar.gz
\
&& cd /tmp \
&& tar -xvf itzi-20.5.tar.gz \
&& cd itzi-20.5 \
&& cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx \
&& python setup.py build \
&& python setup.py install
# To build the image from this file:
# sudo docker build . -t itzi:grass_8_4_gui
# To run command from within the container
# 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
# You can share folders from you local computer with the running Docker
container using volumes (-v "$(pwd))
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user