From 8c317bcb0c08c5f127f4cad990adaffbfb931e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jord=C3=A3o=20Bragantini?= Date: Mon, 19 Aug 2024 12:12:45 -0700 Subject: [PATCH] Updating higra and gpu install docs (#135) * updated docs to higra conda and gpu acceleration * testing docs CI * fixing pydantic autodoc * added missing deps * updating autodoc pydantic version * testing docs build * removed docs build CI test --- .github/workflows/docs.yml | 1 + docs/source/install.rst | 24 ++++++++++++++++-------- docs/source/quickstart.rst | 2 +- pyproject.toml | 4 +++- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 91d0a6a..98e4121 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,6 +38,7 @@ jobs: run: | python -m pip install --upgrade pip pip install ".[docs]" + pip install "autodoc_pydantic==1.9.1" - name: Set environment run: | REPO_OWNER="${GITHUB_REPOSITORY%%/*}" diff --git a/docs/source/install.rst b/docs/source/install.rst index 1d5d6bc..a8272e4 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -9,7 +9,7 @@ Once you have conda (mamba) installed, you should create an environment for ``ul .. code-block:: bash - conda create -n ultrack python=3.11 gurobi pytorch pyqt -c pytorch -c gurobi -c conda-forge + conda create -n ultrack python=3.11 higra gurobi pytorch pyqt -c pytorch -c gurobi -c conda-forge Then, you can activate the environment and install ``ultrack``: @@ -18,21 +18,29 @@ Then, you can activate the environment and install ``ultrack``: conda activate ultrack pip install ultrack -If you're using OSX you may need to install ``higra`` from source. You can do this by running the following commands: +You can check if the installation was successful by running: .. code-block:: bash - conda activate ultrack - pip install numpy - pip install -vv git+https://github.com/higra/Higra - pip install ultrack + ultrack --help -You can check if the installation was successful by running: + +GPU acceleration +---------------- + +Ultrack makes use of GPU for image processing operations. +You can install the additional packages required for GPU acceleration by running (Linux and Windows only): .. code-block:: bash - ultrack --help + conda install pytorch-cuda -c pytorch -c nvidia + conda install cupy -c conda-forge + # linux only + conda install cucim -c rapidsai + # for windows, you can install cucim using pip + pip install git+https://github.com/rapidsai/cucim.git#egg=cucim&subdirectory=python/cucim" +See the `PyTorch website `_ for more information on how to install PyTorch with GPU support. Gurobi setup ------------ diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index fca6f4f..897d5f4 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -9,7 +9,7 @@ Installation If already have a working Python environment, you can install ``ultrack`` using pip. We recommend you use a conda environment to avoid any conflicts with your existing packages. -For additional information on how to create a conda environment and install packages, see :doc:`install`. +If you're using OSX or for additional information on how to create a conda environment and install packages, see :doc:`install`. .. code-block:: bash diff --git a/pyproject.toml b/pyproject.toml index 84e1713..d7b134a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,9 @@ dependencies = [ [project.optional-dependencies] docs = [ - "autodoc_pydantic >= 2.0.0", + "sphinx == 6.2.1", + "autodoc_pydantic", # NOT WORKING, needs to install 'autodoc_pydantic==1.9.1' to build docs + "pydantic-settings", "furo", "myst-parser >= 2.0.0", "nbsphinx >= 0.9.3",