monailabel Installation

 一、安装Anaconda,可参考ubuntu安装conda

二、Creat environment

~/Documents/workspace/下的终端

$conda --version

查看一下conda的版本,若没有出现conda版本信息,则conda安装失败;

$conda create -n monailabel-env python=3.9
$conda activate monailabel-env

如果出现CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'相关的错误,键入source activate之后再次键入conda activate monailabel-env
三、install monailabel

   ~/Documents/workspace/下的终端

$conda activate monailabel-env
$pip install monailabel
$pip freeze

 四、download sample application

      ~/Documents/workspace/下的终端

$monailabel -h
$monailabel apps --download --name radiology --output apps

五、download image study dataset 

         ~/Documents/workspace/下的终端

$monailabel datasets
$monailabel datasets --download --name Task09_Spleen --output datasets

monailabel Installation_第1张图片

 六、start server

        ~/Documents/workspace/下的终端

$monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models deepedit

monailabel Installation_第2张图片

七、install in docker container    

条件:

  1.   安装docker,请参考Ubuntu 20.04 上安装 Docker
  2.   安装nvidia-dicker2,请参考nvidia-docker2安装
  3.   安装pytorch,pytorch与cuda的安装($nvcc -V可查看当前Cuda的版本信息,注意pytorch与    cuda的版本适配关系)

~/Documents/workspace/下的终端

$nvidia-docker --version 
$docker --version
$sudo docker run --gpus all --rm -ti --ipc=host --net=host projectmonai/monailabel:latest

monailabel Installation_第3张图片

 monailabel Installation_第4张图片

 八、install monailabel-weekly

 ~/Documents/下打开终端

$conda create -n monailabel-weekly-env python=3.9
$conda activate monailabel-weekly-env
$pip install monailabel-weekly
$pip freeze
$monailabel -h
$monailabel apps

九、install monailabel github

        ~/Documents/下打开终端

$conda create -n monailabel-env python=3.9
$conda activate monailabel-env
$git --version
$git clone https://github.com/project-MONAI/MONAILabel.git

 monailabel Installation_第5张图片

$cd MONAILabel/
$ll

monailabel Installation_第6张图片

$pip install -r requirements.txt
$ll

monailabel Installation_第7张图片

$./monailabel/scripts/monailabel apps
$./monailabel/scripts/monailabel -h

你可能感兴趣的:(3D,Slicer,ubuntu,linux,python,monai,monailabel)