Setup/Installation Instructions¶
Prerequisites¶
- Python3 with a preference for conda, and python version
3.9
(higher versions might work, but they are untested). - Knowledge of managing Python environments. The instructions below assume knowledge of the conda management system.
We are working on supporting containerized versions of GaNDLF-Synth, which will be available soon.
Optional Requirements¶
- GPU compute (usually STRONGLY recommended for faster training):
- Windows: Microsoft Visual C++ 14.0 or greater. This is required for PyTorch to work on Windows. If you are using conda, you can install it using the following command for your virtual environment:
conda install -c anaconda m2w64-toolchain
.
Installation¶
Install PyTorch¶
GaNDLF-Synth primary computational foundation is built on PyTorch and PyTorch Lightning, and as such it supports all hardware types that PyTorch supports. Please install PyTorch for your hardware type before installing GaNDLF-Synth. The version to use can be found in the setup.py file in the root of the repository (requirements section). See the PyTorch installation instructions for more details.
First, instantiate your environment
(base) $> conda create -n venv_gandlf python=3.9 -y
(base) $> conda activate venv_gandlf
(venv_gandlf) $> ### subsequent commands go here
You may install PyTorch to be compatible with CUDA, ROCm, or CPU-only. An exhaustive list of PyTorch installations for the specific version compatible with GaNDLF can be found here: https://pytorch.org/get-started/previous-versions/#v231 Use one of the following installation commands provided under the "Install PyTorch" section of the PyTorch website. Example - installing PyTorch 2.3.1 with CUDA 12.1: - CUDA 12.1
(venv_gandlf) $> pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
### Install from Package Managers
This option is recommended for most users, and allows for the quickest way to get started with GaNDLF.
```bash
(venv_gandlf) $> pip install gandlf-synth # this will give you the latest stable release
(venv_gandlf) $> git clone git@github.com:mlcommons/GaNDLF-Synth.git
(venv_gandlf) $> cd GaNDLF-Synth
(venv_gandlf) $> pip install .
If you are interested in running the latest version of GaNDLF-Synth, you can install the nightly build by running the following command:
You can also use conda
Test your installation: