Skip to content

linux环境安装

hnluo edited this page Feb 8, 2023 · 9 revisions

conda环境安装

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh 
sh Miniconda3-latest-Linux-x86_64.sh 
source ~/.bashrc
conda create -n funasr python=3.7 #推荐python3.7
conda activate funasr

更多conda安装细节参考https://docs.conda.io/en/latest/miniconda.html

安装pytorch(version >= 1.7.0)

cuda版本
9.2 conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=9.2 -c pytorch
10.2 conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch
11.1 conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch

更多cuda版本对应的pytorch安装命令,请参考 https://pytorch.org/get-started/locally

安装modelscope

pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple #推荐使用上交pip源
pip install "modelscope[audio]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

funasr代码下载

git clone https://github.com/alibaba-damo-academy/FunASR.git

安装funasr

pip install --editable ./
Clone this wiki locally