本文介绍用自己编辑ollama-webui,链接本地ollama
环境
系统:CentOS-7
CPU: 14C28T
内存:32G
显卡:Tesla P40 24G
驱动: 535
CUDA: 12.2
Ollama: 0.3.0
本地ollama
参考
[第二十四篇-Ollama-在线安装](https://blog.csdn.net/hai4321/article/details/138241623)
验证
http://192.168.31.222:11434/
Ollama is running
安装nodejs
https://registry.npmmirror.com/binary.html?path=node/v18.20.2/
node-v18.20.2-linux-x64.tar.gz
tar -zxf node-v18.20.2-linux-x64.tar.gz
vim /etc/profile
export NODE_HOME=/opt/soft/node-v18.20.2-linux-x64/bin
export PATH=$PATH:$NODE_HOME:/usr/local/bin/
使变量文件生效
source /etc/profile
验证
node -v
npm -v
配置镜像源
# 设置为淘宝源地址
npm config set registry https://registry.npmmirror.com
# 查看是否设置成功
npm config get registry
编译
下载代码:
git clone https://github.com/ollama-webui/ollama-webui-lite ollama-webui
安装依赖的工具包
npm install --registry=http://mirrors.cloud.tencent.com/npm/
启动Web可视化
npm run dev
ollama-webui-lite@0.0.1 dev
vite dev --host --port 3000
VITE v4.5.2 ready in 1068 ms
➜ Local: http://localhost:3000/
➜ Network: http://192.168.31.222:3000/
➜ Network: http://172.17.0.1:3000/
访问
http://192.168.31.222:3000
配置ollama的本地api
保存,选择你ollama中有的模型
[root@ai-server soft]# ollama list
NAME ID SIZE MODIFIED
tinyllama:latest 2644915ede35 637 MB 4 days ago
llama-3-8b-u:latest a4f9abe93500 4.9 GB 11 days ago
yi-1.5-34b:latest 28fcd739309f 20 GB 2 weeks ago
internlm2_5-20b:latest eddbf49c317b 11 GB 3 weeks ago
mistral-nemo:12b-instruct-2407-q4_K_M ad2adccd15ad 7.5 GB 4 weeks ago
llama3.1:8b-instruct-q4_K_M f8f83c5f9af1 4.9 GB 4 weeks ago
yi:9b-chat-v1.5-q4_K_M 70f792429c07 5.3 GB 4 weeks ago
llama3.1:latest a340353013fd 4.7 GB 4 weeks ago
qwen2:0.5b 6f48b936a09f 352 MB 4 weeks ago
qwen2:1.5b f6daf2b25194 934 MB 5 weeks ago
athene-70b-q2:latest 03ce01bc2c99 26 GB 5 weeks ago
mofanke/acge_text_embedding:latest dd257071cdac 651 MB 5 weeks ago
quentinz/bge-base-zh-v1.5:latest cd232613fa6f 204 MB 5 weeks ago
quentinz/bge-large-zh-v1.5:latest bc8ca0995fcd 651 MB 5 weeks ago
glm4:latest 5b699761eca5 5.5 GB 6 weeks ago
codegeex4:latest 867b8e81d038 5.5 GB 6 weeks ago
internlm2_5-7b:latest 357634f5a926 4.7 GB 7 weeks ago
gemma-2-27b:latest 4405ce42718c 16 GB 8 weeks ago
deepseek-coder-v2-lite-8:latest 20c0b5b7c063 16 GB 2 months ago
qwen2-57b:latest 47449de09cb8 32 GB 2 months ago
codeqwen1.5-7b:latest 39a6a464a2d2 4.7 GB 3 months ago
mixtral-7_8b:latest 40a7cfe6dbf1 26 GB 4 months ago
llama-3-8b-instruct:latest 2143c3e3f672 4.9 GB 4 months ago
qwen1.5-32b:latest 96743882fd6d 19 GB 4 months ago
qwen1.5-14b:latest 3cc8bb79440c 9.2 GB 4 months ago
qwen:0.5b-chat-v1.5-q4_K_M e1c9c6192a7e 407 MB 4 months ago
qwen1.5-moe:latest b3247e5069ed 10 GB 4 months ago
开始聊天