1.确保阿里云服务器cuda版本安装好
(这步不会建议别往下看)
我这选的是12.4
2.直接安装all
conda create -n xinference python=3.10
conda acivate xinference
pip install "xinference[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu124/torch2.4
这个要根据自己的pytorch版本来安装,可以去这个网站找
https://docs.flashinfer.ai/installation.html
题主安装的是2.5版本
到这xinference便安装好了
3.启动xinference服务
xinference-local --host 0.0.0.0 --port 9997
通常下载模型直接启动访问不了huggingface,推荐使用下面的方式启动
XINFERENCE_MODEL_SRC=modelscope xinference-local --host 0.0.0.0 --port 9997
运行之后如下
4.直接在本地网页输入
题主用的是阿里云服务器,需要把端口转发出来
到这xinference已经能够正常启动了
5.打开网页操作(网页如下)
左下角可以中英文切换
选择启动模型,搜索自己想要部署的模型
点左下角小🚀
可以看到后台日志已经开始下载了