基于Windows11的Xinference安装方法简介

基于Windows11的Xinference安装方法简介

快速启动命令:

conda activate D:\cwgis_AI\xinference

xinference-local --host 192.168.1.82 --port 9997

bash 复制代码
conda activate D:\cwgis_AI\xinference
xinference-local --host 192.168.1.82 --port 9997

http://192.168.1.82:9997

http://127.0.0.1:9997

conda deactivate

bash 复制代码
conda deactivate

一、基础安装
conda安装

下载anaconda 2022.10 window-x86-x64.exe
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=A

设置系统Path

bash 复制代码
path+=
D:\ProgramData\Anaconda3
D:\ProgramData\Anaconda3\Scripts
D:\ProgramData\Anaconda3\Library\bin
D:\ProgramData\Anaconda3\Library\mingw-w64\bin

查看版本:

conda --version

python

bash 复制代码
conda --version
python

cuda安装

安装cuda和cudnn环境前:先要安装和升级显卡驱动程序

注意查看cuda或cudnn开发者库有没有安装,其显著特征就是:

bash 复制代码
有没有目录路径 C:\Program Files\NVIDIA GPU Computing Toolkit

cuda下载地址:https://developer.nvidia.com/cuda-toolkit-archive

我选择的是版本11.7版本

nvcc -V #测试是否安装成功

bash 复制代码
C:\Users\Administrator>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:59:34_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

检查该计算机适配的CUDA版本:向下兼容

方法一:命令行输入nvidia-smi

bash 复制代码
NVIDIA-SMI 572.70                 Driver Version: 572.70         CUDA Version: 12.8
NVIDIA GeForce GTX 1080           832MiB /   8192MiB

CUDNN的安装

下载地址:
https://developer.nvidia.com/rdp/cudnn-download

必须注册后下载cuda11版本 8.9的window版本

cudnn-windows-x86_64-8.9.4.25_cuda11-archive.zip

(就是将解压后得到的的bin ,include 和lib文件夹分别复制到cuda安装路径下与cuda的bin ,include 和lib文件夹合并)

国内镜像源配置

通过win+R输入cmd进入命令行,通过输入下面命令配置为清华源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

二、xinference安装

先创建python环境

bash 复制代码
conda env list
conda remove -p D:\cwgis_AI\xinference --all

创建独立python空间

D:\cwgis_AI\xinference>

bash 复制代码
conda create --prefix=D:\cwgis_AI\xinference  python=3.10

激活环境

D:\cwgis_AI\xinference>

bash 复制代码
conda activate D:\cwgis_AI\xinference

安装基础库

bash 复制代码
安装C++ MSVC V143 Build Tool工具 (C++桌面开发) vs2019/2022安装工具中添加/修改
conda config --add channels conda-forge
python -m pip install --upgrade pip
pip install wheel  
pip install --use-pep517 vllm

安装xinference

bash 复制代码
pip install "xinference[transformers]" -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install sentence-transformers

更改Xinference下载模型存储目录方法

启动前添加系统变量XINFERENCE_HOME

等于下载模型另存为目录地址:

D:\cwgis_AI\XINFERENCE_HOME

bash 复制代码
启动前添加系统变量  XINFERENCE_HOME
D:\cwgis_AI\XINFERENCE_HOME

启动xinference服务 Xinference启动

运行以下命令启动Xinference:

(D:\cwgis_AI\xinference) D:\cwgis_AI\xinference>

xinference-local --host 192.168.1.82 --port 9997

bash 复制代码
xinference-local --host 192.168.1.82 --port 9997
xinference-local --host 127.0.0.1 --port 9997

查看运行界面:

bash 复制代码
http://192.168.1.82:9997
http://127.0.0.1:9997

Xinference主界面

dify中添加Xinference中bce-reranker-base_v1模型方法

本blog地址:https://blog.csdn.net/hsg77

相关推荐
火山kim9 分钟前
经典论文研读报告:DAGGER (Dataset Aggregation)
人工智能·深度学习·机器学习
Coding茶水间21 分钟前
基于深度学习的水果检测系统演示与介绍(YOLOv12/v11/v8/v5模型+Pyqt5界面+训练代码+数据集)
图像处理·人工智能·深度学习·yolo·目标检测·机器学习·计算机视觉
檐下翻书17323 分钟前
算法透明度审核:AI 决策的 “黑箱” 如何被打开?
人工智能
undsky_25 分钟前
【RuoYi-SpringBoot3-Pro】:接入 AI 对话能力
人工智能·spring boot·后端·ai·ruoyi
网易伏羲36 分钟前
网易伏羲受邀出席2025具身智能人形机器人年度盛会,并荣获“偃师·场景应用灵智奖
人工智能·群体智能·具身智能·游戏ai·网易伏羲·网易灵动·网易有灵智能体
搬砖者(视觉算法工程师)40 分钟前
什么是无监督学习?理解人工智能中无监督学习的机制、各类算法的类型与应用
人工智能
西格电力科技1 小时前
面向工业用户的绿电直连架构适配技术:高可靠与高弹性的双重设计
大数据·服务器·人工智能·架构·能源
TextIn智能文档云平台1 小时前
图片转文字后怎么输入大模型处理
前端·人工智能·python
Hy行者勇哥1 小时前
从零搭建小智 AI 音箱 MCP 开发环境:自定义智能家居控制技能实战指南
人工智能·嵌入式硬件·硬件工程·智能家居
leaf_leaves_leaf1 小时前
强化学习奖励曲线
人工智能