环境配置
conda create --name py38pt171mi python=3.8
# CUDA 11.0
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
editable installation
git clone https://github.com/Project-MONAI/MONAI.git
cd MONAI/
python setup.py develop
or, to build with MONAI Cpp/CUDA extensions and install:
cd MONAI/
BUILD_MONAI=1 python setup.py develop
# for MacOS
BUILD_MONAI=1 CC=clang CXX=clang++ python setup.py develop
To uninstall the package please run:
cd MONAI/
python setup.py develop --uninstall
# to further clean up the MONAI/ folder (Bash script)
./runtests.sh --clean
You can verify the installation by:
python -c 'import monai; monai.config.print_config()'