基于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

相关推荐
IT_陈寒11 小时前
Vite打包时踩的坑:静态资源为啥突然404了?
前端·人工智能·后端
一点一木12 小时前
🚀 2026 年 6 月 GitHub 十大热门项目排行榜 🔥
人工智能·github
aneasystone本尊12 小时前
学习 turbovec 的 SIMD 搜索内核
人工智能
阳光是sunny21 小时前
别再被 worktree 绕晕了!AI 编程时代你必须掌握的 Git 隔离神器
前端·人工智能·后端
冬奇Lab21 小时前
每日一个开源项目(第148篇):obsidian-skills - Obsidian CEO 亲写的 AI Agent 格式规范,让 Agent 不再破坏你的 Vault
人工智能·开源·资讯
ethantan21 小时前
AI Agent 组成:像人一样思考的智能体
人工智能·程序员·架构
冬奇Lab1 天前
Workflow 系列(05):评测体系——三层测试结构与 Trace 追踪
人工智能·工作流引擎
ethantan1 天前
一篇讲解AI Agent 组成:像人一样思考的智能体
人工智能·后端·程序员
Cosolar1 天前
vLLM 生产级部署完全指南
人工智能·后端·架构
CodePlayer竟然被占用了1 天前
被美国政府封杀18天,Claude Fable 5 回来了——但代价是什么?
人工智能