配置千問環境比較順利,有些由于速度問題較慢,添加源之后提速很多,記錄如下:
1.創建虛擬環境
conda create -p /datanas3/chenjing/envs/qwen python==3.8
2.激活虛擬環境
conda activate /datanas3/chenjing/envs/qwen
3.添加源
conda config --show channels
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
conda config --set show_channel_urls yes
conda config --show channels
4.安裝pytorch和torchvision
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
5.安裝Qwen-VL需要依賴
cd /datanas3/chenjing/openproject/Qwen-VL/
pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
6.安裝modelscope(下載模型需要)
pip install modelscope -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
進行以上步驟后,按照說明文件測試示例正常