替换conda源为境内加速源
conda config --add channels https://mirrors.sustech.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.sustech.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.sustech.edu.cn/anaconda/pkgs/msys2
conda config --set custom_channels.pytorch https://mirrors.sustech.edu.cn/anaconda/cloud/
conda config --set custom_channels.conda-forge https://mirrors.sustech.edu.cn/anaconda/cloud/
conda config --set custom_channels.nvidia https://mirrors.cernet.edu.cn/anaconda-extra/cloud/
conda config --set show_channel_urls yes
创建conda环境(例为创建名为f5-tts基于python3.10的conda环境)
conda create -n f5-tts python=3.10
查询conda环境列表
conda env list
查询cuda驱动版本
nvidia-smi
使用pip安装pytorch
# CUDA 11.8
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# CUDA12.6
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
# CUDA12.8
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
使用pip安装pytorch
# CUDA 11.8
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=11.8 -c pytorch -c nvidia
# CUDA 12.1
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.1 -c pytorch -c nvidia
# CUDA 12.4
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.4 -c pytorch -c nvidia
使用阿里云加速源加速pip安装
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
pip install f5-tts -i https://mirrors.aliyun.com/pypi/simple/
OLLAMA自定义API端口环境配置
export OLLAMA_HOST=0.0.0.0:11333
ollama serve &
评论