Currently, we only support
Linux operating systems.
users have the possibility to install and use
Windows Subsystem for Linux (WSL). The steps below (about updating bashrc) are strongly recommended for MacOS users in the installation process but are optional for Linux users.
Open your bash/zsh script file with editor on your computer.
If you are using bash shellvim ~/.bashrc
If you are using zsh shellvim ~/.zshrc
Write in your .bashrc/.zshrc file with following line.
Save this change and restart your terminal to apply the change.
There are fundamentally two different approaches to install
- Install via Conda
- This is the easiest way for personal computers.
- Install via Venv/VirtualEnv
- This is compatible with ComputeCanada cluster environment.
Approach 1: Conda¶
git clone https://github.com/neuropoly/ivadomed.git cd ivadomed
Step 2: Create new Conda Env called IvadoMedEnv (may take 5 to 15 minutes)¶
conda env create --file environment.yml
Step 3 : Activate environment and use¶
conda activate IvadoMedEnv
Step 4 : Install from source¶
pip install -e .
Approach 2: Venv¶
Step 1: Setup Python Virtual Environment.¶
ivadomed requires Python >= 3.6 and <3.9 (If you are using Compute Canada, you can load modules (e.g. python 3.9) as mentioned here and also here ). We recommend
working under a virtual environment, which could be set as follows:
virtualenv venv-ivadomed source venv-ivadomed/bin/activate
If the default Python version installed in your system does not fit the version requirements, you might need to specify a version of Python associated with your virtual environment:
virtualenv venv-ivadomed --python=python3.6
git clone https://github.com/ivadomed/ivadomed.git cd ivadomed
Step 3: Install PyTorch 1.5 and TorchVision¶
If you have a compatible NVIDIA GPU that supports CUDA, run the following command:
pip install -r requirements_gpu.txt
If you do not have a compatible GPU, run the following installer to use
ivadomed with CPU.
pip install -r requirements.txt
Step 4: Install from release (recommended)¶
ivadomed and its requirements from
pip install --upgrade pip pip install ivadomed
(Optional) Alternative Step 4 for Developers: Install from source¶
Bleeding-edge developments are available on the project’s master branch on Github. Installation procedure is the following at repository root:
cd ivadomed pip install -e .
(Optional) Step 5 for Developers Install pre-commit hooks¶
pre-commit to enforce a limit on file size.
After you’ve installed
ivadomed, install the hooks:
pip install -r requirements_dev.txt pre-commit install