首页
友情链接
Search
1
centos 7 部署ollama 本地大模型并使用open-webui 可视化
2,047 阅读
2
利用calibre-web搭建私人书库
1,152 阅读
3
webStrom 通过electron创建第一个桌面程序
923 阅读
4
AdGuardHome 个人DNS服务器搭建记录
775 阅读
5
gitee 发了个人生第一个开源项目
715 阅读
默认分类
kafka
JavaScript
linux
java
vue
自建服务
spring
登录
Search
标签搜索
kafka
vue
docker
electron
JavaScript
spring
quartz
图床
Nginx
spring boot
宝塔
aria2
webUI
docker-compose
Python
小程序
SUI Mobile
k8s
html
PotPlayer
Abdulla
累计撰写
43
篇文章
累计收到
39
条评论
首页
栏目
默认分类
kafka
JavaScript
linux
java
vue
自建服务
spring
页面
友情链接
搜索到
43
篇与
的结果
2024-11-12
此内容被密码保护
加密文章,请前往内页查看详情
2024年11月12日
6 阅读
0 评论
0 点赞
2024-11-07
windows终端使用scp复制文件到远程Linux服务器
scp -O -P10022 D:\codes\java\deepface-import\ruoyi-admin\target\ruoyi-admin.jar
[email protected]
:/home/centuser/
2024年11月07日
93 阅读
0 评论
0 点赞
2024-02-19
centos 7 部署ollama 本地大模型并使用open-webui 可视化
Ollama是一个专注于本地部署和运行大型语言模型的项目,例如Llama 2和Mistral,跟ChatGPT一样,可以生成相关的对话内容。Ollama 部署非常简单,这里就不细说,登录https://ollama.com/ 点击download,根据自己系统需求选择Windows,linux,或者macOS版本。这里我们使用Linux方式部署。一键部署指令:curl https://ollama.ai/install.sh | sh脚本需要访问GitHub下载相关文件,如果网络不具备访问GitHub条件,那么需要设置代理来完成ollama的安装#192.168.5.199:18089 地址是我本机开的代理地址和端口 export http_proxy=http://192.168.5.199:18089 export https_proxy=http:/192.168.5.199:18089安装完成之后执行命令systemctl status ollama查看ollama 启动状态,Active: active (running) 为启动成功查看11434端口是否被正确监听lsof -i :11434如果显示 TCP localhost:11434 表示 11434端口只能被被本地访问,以便后续我们需要部署open-webui 访问ollama ,因此需要先把端口暴露出去vim /etc/systemd/system/ollama.service.d/override.conf #加入environment [Service] Environment="OLLAMA_HOST=0.0.0.0" #重启ollama systemctl daemon-reload systemctl restart ollama #检查是否生效 lsof -i :11434 #显示*:11434表示成功 #防火墙开放11434端 firewall-cmd --zone=public --add-port=11434/tcp --permanet firewall-cmd reload拉取llama2模型并加载ollama run llama2测试ollama使用rest-api(192.168.20.131是我部署ollama使用的服务器局域网ip地址)POST http://192.168.20.131:11434/api/generate Content-Type: application/json { "model": "llama2", "prompt": "Why is the sky blue?" }有结果表示成功接下来部署open-webui,这里使用docker。docker安装部署略github地址:https://github.com/open-webui/open-webuidocker 脚本:docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main由于ghcr.io 下载镜像非常慢,这里需要绕一下。有个play-with-dockerhttps://labs.play-with-docker.com/访问ghrc.io速度相当不错。通过dockerhub账户登录之后,创建实力。并执行部署脚本,然后打tag 推送到dockerhub。这样速度会快很多。在play-with-docker 上的实例执行上述docker部署脚本。成功之后开始打tag 并推送docker login #输入dockerhub 用户名密码登录,用于推送镜像 docker images docker tag ghcr.io/open-webui/open-webui:main 用户名/open-webui:main #推送镜像 docker push 用户名/open-webui:main之后用我们推送到dockerhub上的镜像启动web-uidocker run -d -p 3080:8080 --privileged --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always abdulla1992/open-webui:main启动成功之后注册账号并开始使用open-webui选择模型并聊天
2024年02月19日
2,047 阅读
3 评论
1 点赞
2024-01-03
我曾七次鄙视自己的灵魂
我曾七次鄙视自己的灵魂:第一次,是当我看到她本可进取,却故作谦卑时。第二次,是当我看到她在瘸子面前跛行而过时。第三次,是当她在难易之间,却选择了容易时。第四次,是当她犯了错,却借由别人也会犯错来宽慰自己时。第五次,是当她因为软弱而忍让,却声称为自己的坚韧时。第六次,是当她鄙夷一张丑恶的嘴脸,却不知那正是自己面具中的一副时。第七次,是当她吟唱圣歌,却自诩为一种美德时。原文:Seven times have I despised my soul:——Kahlil GibranThe first time when I saw her being meek that she might attain height.The second time when I saw her limping before the crippled.The third time when she was given to choose between the hard and the easy, and she chose the easy.The fourth time when she committed a wrong, and comforted herself that others also commit wrong.The fifth time when she forbore for weakness, and attributed her patience to strength.The sixth time when she despised the ugliness of a face, and knew not that it was one of her own masks.And the seventh time when she sang a song of praise, and deemed it a virtue.
2024年01月03日
187 阅读
0 评论
0 点赞
2023-12-07
充电桩互联互通 AES 参数加解密(Hutool实现)
PileSignUtils 充电桩互联互通 AES 参数加解密import cn.hutool.crypto.digest.HMac; import cn.hutool.crypto.digest.HmacAlgorithm; import cn.hutool.crypto.symmetric.AES; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Date; public class PileSignUtils { private static Logger logger = LoggerFactory.getLogger(PileSignUtils.class); /** * aes 加密 * @param params 待加密参数 * @param dataSecret 密钥 * @param dataSecretIV 密钥向量 * @return 解密结果 */ public static String signParams(String params,String dataSecret,String dataSecretIV){ AES aes = new AES("CBC","PKCS5Padding",dataSecret.getBytes(),dataSecretIV.getBytes()); return aes.encryptBase64(params); } /** * aes 加密 * @param params 待加密参数 * @param dataSecret 密钥 * @param dataSecretIV 密钥向量 * @return 解密结果 */ public static String decryptParams(String params,String dataSecret,String dataSecretIV){ AES aes = new AES("CBC","PKCS5Padding",dataSecret.getBytes(),dataSecretIV.getBytes()); return aes.decryptStr(params); } public static String getSign(String data,String signSecret,String platformId){ long timeStamp = new Date().getTime(); int nextSequence = SequenceGenerator.getNextSequence(); int len = 64-signSecret.length(); if (signSecret.length()<64){ for (int i = 0; i < len; i++) { signSecret = signSecret + "0"; } } logger.info(signSecret); byte[] key = signSecret.getBytes(); HMac mac = new HMac(HmacAlgorithm.HmacMD5, key); String str = mac.digestHex(data); return str; }
2023年12月07日
212 阅读
7 评论
0 点赞
1
2
...
9