Installation - sickkids-mri/mrrecon GitHub Wiki
This repository depends on twixtools for reading raw data into Python, and depends on CuPy and SigPy for handling device agnostic (CPU/GPU) code. Before proceeding, be sure to have git and Python installed. It is common to use the Anaconda distribution of Python.
Running on HPF
If you are a member of the SickKids High Performance Computing Facility (HPF) and plan to run this repository on HPF, you can skip the step for installing CuPy since it is already installed there in a module. Once you're on an HPF compute node, this module can be loaded by:
module load pytorch/1.4.0-conda3.7-GPU
This module is updated regularly so be sure to load the latest version. You will however still need to install the other Python packages yourself. When installing Python packages on HPF, remember to include the --user
flag, e.g. pip install --user packagename
.
Install CuPy
If computation will be performed on a GPU (recommended), CuPy will need to be installed. CuPy depends on the CUDA Toolkit (aka CUDA). If you already have a version of CUDA installed, then install the pip CuPy package with the command corresponding to the CUDA version installed. For example, if CUDA 10.1 is already installed, then install CuPy by:
pip install cupy-cuda101
If you don't have CUDA already installed, then install the Anaconda CuPy package (which includes CUDA):
conda install -c conda-forge cupy
Install SigPy
Install the pip package:
pip install sigpy
Install twixtools
Navigate back to the parent directory.
git clone https://github.com/mrphysics-bonn/twixtools.git
cd twixtools
pip install .
Install mrrecon
Finally, mrrecon can be installed through pip. Remember to navigate back to the parent directory.
git clone https://github.com/sickkids-mri/mrrecon.git
cd mrrecon
pip install .
If you plan to contribute to mrrecon (i.e. create branches and pull requests), install with the -e
flag:
pip install -e .
This will allow you to make changes to Python files inside the repository without needing to update the installation each time.
Install Linters
If you are contributing to this repository, please install and use the following linters.
pip install pycodestyle
pip install flake8