Installation¶
Requirements¶
- Operating system
Linux. Tested on Ubuntu 18.04, 20.04 and CentOS 7
- Python 3.8
This can be installed below using Conda if needed.
- GPU
A CUDA capable GPU is required for some operations. CPU alternatives are provided, so it is possible to perform a tomographic reconstruction on a system without a GPU.
- RAM
A large amount of RAM is needed to hold a dataset in memory. A 2k x 2k resolution with 1k projections held as 32 bit floats uses 16 GB of RAM. To perform safe (undoable) operations the requirement is doubled. Requirements scale with increased resolution, projection counts and bit depth.
Installing¶
The simplest way to install the toolkit is via the packages published to Anaconda Cloud, this can be done with an existing Conda or Mamba distribution if you already have one on your machine.
1. These dependencies must be present on your system before installing the Mantid Imaging environment. Please look for instructions specific to your OS on how to do that:
CUDA Runtime version 10.2 - https://developer.nvidia.com/cuda-10.2-download-archive
gcc - needed for compiling some python modules
Download and install Mambaforge or Miniconda 3
Make sure
mamba
orconda
is available on your PATH. The steps below assume you are using mamba.Create a mantidimaging conda environment:
mamba env create -f https://raw.githubusercontent.com/mantidproject/mantidimaging/stable/environment.yml
(Specific versions can be installed by using the release url, e.g. https://raw.githubusercontent.com/mantidproject/mantidimaging/release-2.2.0/environment.yml)
This creates an environment called
mantidimaging
that you can activate viaconda activate mantidimaging
[Optional] If you wish to run
mantidimaging-ipython
, you will need to haveipython
installed. This can be done with the commandconda install ipython
.
Running the package¶
Activate the environment created in the installation step:
conda activate mantidimaging
Run using one of the following commands:
GUI:
mantidimaging
IPython:
mantidimaging-ipython
Running the source¶
To run from a downloaded source code, e.g. a git checkout:
Activate the environment created in the installation step:
conda activate mantidimaging
Run using one of the following commands:
From the root of the repository run with
python -m mantidimaging
Nightly version¶
The latest nightly version can be installed with
mamba env create -f https://raw.githubusercontent.com/mantidproject/mantidimaging/main/environment.yml
This will make a mantidimaging-nightly environment.
Updating¶
To update to the latest version of Mantid Imaging run:
conda activate mantidimaging && mamba update mantidimaging
If you see any issues with package compatibility, the fastest solution is reinstalling the environment - see below.
Reinstalling the environment¶
To completely delete the Mantid Imaging environment follow these steps:
conda deactivate
to exit out of the conda Mantid Imaging environment
mamba env list
to see which environments you have installed
mamba env remove -n mantidimaging
and press
y
to confirm. Replace mantidimaging with any other environment you wish to remove
Follow steps 4 and 5 from Installing.