PiLiQiu

PiLiQiu

不积跬步,无以至千里;不积小流,无以成江海。

Xinference 安装

安装 Xinference 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 # 创建虚拟环境 conda create -n xinference python=3.11 # 激活虚拟环境 conda activate xinference # 安装的时候报错,提示缺少 torch,pip install torch 安装 torch pip install "xinference[all]" # Apple M系列 CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python # 英伟达显卡 CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python # AMD 显卡 CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python # 启动 Xinference xinference-local --host 主机ip --port 9997 # 启动模型 xinference launch --model-name ChatTTS --model-type audio --endpoint http://主机ip:9997 # 因为是 TTS 模型,需要安装 ffmpeg conda install -c conda-forge ffmpeg ffmpeg -version # 在使用的时候报错:ImportError: Failed to intialize FFmpeg extension. Tried versions: ['6', '5', '4', '']. Enable DEBUG logging to see more details about the error. # 降级 FFmpeg conda activate xinference conda install -c conda-forge ffmpeg=5.1.2 ffmpeg -version (图1) Dify 添加 Xinference (图2)

Linux 使用

1 2 3 4 5 6 7 8 # 保存镜像为 .tar 文件 docker save -o xiaozhi-esp32-server.tar xiaozhi-esp32-server:server_latest # 将 .tar 文件传输到其他服务器上的 /data 目录下 scp xiaozhi-esp32-server.tar ip:/data # 加载 .tar 文件为镜像 docker load -i /path/to/xiaozhi-esp32-server.tar

Git 使用

Zip下载的项目拉取最新的代码 场景:在 github 上用下载压缩包的方式拉取了一个项目,现在项目更新了,想要通过 git 拉取。
0%