Developer install

Short version

If you have conda and poetry installed you can install it all with the following commands.

From the root folder of the timagetk repository:

cd timagetk
conda env create -n timagetk_dev --file conda/env/timagetk_dev.yaml
conda activate timagetk_dev
poetry install --all-extras
python -m pip install -e ../ctrl/.
python -m pip install -e ../visu_core/.

Note

The poetry install --all-extras command is equivalent to python -m pip install -e .[codecs,doc,nb,test].

This will also need to install ctrl & visu_core from our Gitlab. Have a look at the detailed section to clone and install their sources.

Third-party - PlantSeg

To use the PlantSeg package with a CUDA GPU:

conda install -c gnomon -c conda-forge -c pytorch -c nvidia plantseg pytorch-cuda=11.7 gcc=12 

To use the PlantSeg package for CPU:

conda install -c gnomon -c conda-forge -c pytorch plantseg cpuonly 

Detailed version

Clone the sources

We have to clone timagetk sources, but we also need to clone sources for ctrl & visu_core.

From the folder where you want to clone the sources, e.g. ~/Projects/:

git clone https://gitlab.inria.fr/mosaic/timagetk.git --branch develop
git clone https://gitlab.inria.fr/mosaic/work-in-progress/ctrl.git --branch develop
git clone https://gitlab.inria.fr/mosaic/work-in-progress/visu_core.git --branch develop

Initialize a conda environment

From the root folder of the timagetk repository:

cd timagetk
conda env create -n timagetk_dev --file conda/env/timagetk_dev.yaml

This will create a conda environment named timagetk_dev and install the required dependencies available as conda packages.

Note

This should install the required packages from morpheme, if not: conda install vt vt-python -c morpheme -c conda-forge.

Install the sources

We now may install the sources that we cloned earlier.

Note

The -e option allows accessing modifications to source code without the need to re-install.

Install ctrl sources

To install ctrl from the sources with pip, simply run:

conda activate timagetk_dev
python -m pip install -e ../ctrl/.

Install visu_core sources

To install visu_core from the sources with pip, simply run:

conda activate timagetk_dev
python -m pip install -e ../visu_core/.

Install timagetk sources

To install timagetk from the sources, and the documentation and test requirements, with pip, simply run:

conda activate timagetk_dev
python -m pip install -e .[all]

Note

This should install the packages required to generate the sphinx documentation, if not run: python -m pip install -e .[doc].

This should install the packages required to perform tests, if not run: python -m pip install -e .[test].