下载Anaconda安装
wget -c https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
bash ./Anaconda3-2022.05-Linux-x86_64.sh
输入两次yes后安装完成,一次同意协议,一次是在.bashrc安装初始化脚本
重新登录shell创建环境
conda create -n modelscope python=3.7
conda activate modelscope
pip install torch torchvision torchaudio tensorflow
pip install setuptools_scm
pip install fairseq
安装modelscope nlp功能
pip install "modelscope[nlp]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
安装modelscope cv功能
pip install "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
测试
python -c "from modelscope.pipelines import pipeline;print(pipeline('word-segmentation')('安装modelscope'))"