Skip to content

Commit

Permalink
Require the ASTRA-Toolbox version 2.0
Browse files Browse the repository at this point in the history
This removes the necessity of the ASTRA Toolbox development channel on
Conda.
  • Loading branch information
ahendriksen authored and D1rk123 committed Feb 9, 2022
1 parent 1829137 commit 04b4348
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build:
variables:
script:
- conda install -yq conda-build conda-verify
- conda build conda/ -c defaults -c astra-toolbox/label/dev
- conda build conda/ -c defaults -c astra-toolbox
- mkdir -p artifacts
- mv /opt/conda/conda-bld/noarch/tomosipo*.tar.bz2 artifacts/
artifacts:
Expand Down Expand Up @@ -61,7 +61,7 @@ pages:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_conda.sh
- bash install_conda.sh -b
- export PATH="$HOME/miniconda3/bin:$PATH"
- conda install python=3.7 cudatoolkit=9.2 astra-toolbox pyqtgraph pyqt pyopengl pytorch ffmpeg ffmpeg-python matplotlib sphinx ipython sphinx_rtd_theme recommonmark -c defaults -c astra-toolbox/label/dev -c conda-forge -yq
- conda install python=3.7 cudatoolkit=9.2 astra-toolbox pyqtgraph pyqt pyopengl pytorch ffmpeg ffmpeg-python matplotlib sphinx ipython sphinx_rtd_theme recommonmark -c defaults -c astra-toolbox -c conda-forge -yq
- pip install .[dev]
- sphinx-apidoc -M -f -e --tocfile api_reference -H "API Reference" --ext-autodoc -o doc/ref/ tomosipo
- sphinx-build -b html doc/ public
Expand Down
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,22 @@ entry:
A minimal installation requires:

- python >= 3.6
- ASTRA-toolbox (the latest 1.9.x development version is **required**)
- ASTRA-toolbox >= 2.0
- CUDA

These requirements can be installed using conda (replace `<X.X>` by your
CUDA version)
The requirements can be installed using the anaconda package manager. The
following snippet creates a new conda environment named `tomosipo` (replace
`X.X` by your CUDA version)

conda create -y -n tomosipo python=3.8 astra-toolbox cudatoolkit=<X.X> -c astra-toolbox/label/dev
pip install git+https://github.com/ahendriksen/tomosipo@develop
source activate tomosipo

To use tomosipo with PyTorch, QT, ODL, and cupy, install:

conda create -y -n tomosipo python=3.8 astra-toolbox cudatoolkit=<X.X> pytorch cupy pyqtgraph pyqt pyopengl cupy \
-c defaults -c astra-toolbox/label/dev -c pytorch -c conda-forge
source activate tomosipo
# Install latest version of ODL:
pip install git+https://github.com/odlgroup/odl
# Install development version of tomosipo:
pip install git+https://github.com/ahendriksen/tomosipo@develop
conda create -n tomosipo cudatoolkit=<X.X> tomosipo -c defaults -c astra-toolbox -c aahendriksen

More information about installation is provided in the [documentation](https://aahendriksen.gitlab.io/tomosipo/intro/install.html).

<a id="orgb723de1"></a>

# Usage

Simple examples:


<a id="org887ab1a"></a>

## Create and visualize geometries
Expand Down
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ build:
requirements:
host:
- python >=3.6
- astra-toolbox
- astra-toolbox >=2.0
- setuptools
- pytest-runner

run:
- python >=3.6
- astra-toolbox
- astra-toolbox >=2.0

about:
home: https://github.com/ahendriksen/tomosipo
Expand Down
10 changes: 5 additions & 5 deletions doc/intro/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Install tomosipo
A minimal installation requires:

* python >= 3.6
* ASTRA-toolbox (the latest 1.9.x development version is *required*)
* ASTRA-toolbox >= 2.0
* CUDA

Installation using anaconda
Expand All @@ -16,7 +16,7 @@ following snippet creates a new conda environment named `tomosipo` (replace

.. code-block:: bash
conda create -n tomosipo cudatoolkit=<X.X> tomosipo -c defaults -c astra-toolbox/label/dev -c aahendriksen
conda create -n tomosipo cudatoolkit=<X.X> tomosipo -c defaults -c astra-toolbox -c aahendriksen
Install the latest development branch
Expand All @@ -27,7 +27,7 @@ environment named `tomosipo` containing the required packages:

.. code-block:: bash
conda create -n tomosipo python=3.8 astra-toolbox cudatoolkit=X.X -c astra-toolbox/label/dev
conda create -n tomosipo python=3.8 astra-toolbox cudatoolkit=X.X -c astra-toolbox
Then activate the environment and install tomosipo using pip:

Expand All @@ -44,7 +44,7 @@ To use tomosipo with PyTorch, QT, ODL, and cupy, install:
.. code-block:: bash
conda create -n tomosipo tomosipo cudatoolkit=<X.X> pytorch cupy pyqtgraph pyqt pyopengl cupy \
-c defaults -c astra-toolbox/label/dev -c pytorch -c conda-forge -c aahendriksen
-c defaults -c astra-toolbox -c pytorch -c conda-forge -c aahendriksen
source activate tomosipo
# Install latest version of ODL:
pip install git+https://github.com/odlgroup/odl
Expand All @@ -58,4 +58,4 @@ To just install PyTorch, use

.. code-block:: bash
conda create -n tomosipo pytorch cudatoolkit=<X.X> tomosipo -c defaults -c astra-toolbox/label/dev -c aahendriksen -c pytorch
conda create -n tomosipo pytorch cudatoolkit=<X.X> tomosipo -c defaults -c astra-toolbox -c aahendriksen -c pytorch
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# history = history_file.read()

requirements = [
'astra-toolbox',
'astra-toolbox>=2.0',
'numpy',
]

Expand Down
12 changes: 6 additions & 6 deletions tomosipo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def __import_astra_functionality():
except AttributeError:
raise ImportError(
"Cannot find all required astra.experimental methods. \n"
"Please make sure you have at least ASTRA version 1.9.9-dev4 installed. \n"
"You can install the latest ASTRA development version using: \n"
"> conda install astra-toolbox -c astra-toolbox/label/dev "
"Please make sure you have at least ASTRA version 2.0 installed. \n"
"You can install the latest ASTRA version using: \n"
"> conda install astra-toolbox=2.0 -c astra-toolbox "
)
except ImportError:
raise ImportError(
"Cannot find all required astra.experimental methods. \n"
"Please make sure you have at least ASTRA version 1.9.9-dev4 installed. \n"
"You can install the latest ASTRA development version using: \n"
"> conda install astra-toolbox -c astra-toolbox/label/dev "
"Please make sure you have at least ASTRA version 2.0 installed. \n"
"You can install the latest ASTRA version using: \n"
"> conda install astra-toolbox=2.0 -c astra-toolbox "
)

0 comments on commit 04b4348

Please sign in to comment.