首页
友情链接
Search
1
centos 7 部署ollama 本地大模型并使用open-webui 可视化
1,708 阅读
2
利用calibre-web搭建私人书库
997 阅读
3
webStrom 通过electron创建第一个桌面程序
698 阅读
4
AdGuardHome 个人DNS服务器搭建记录
633 阅读
5
gitee 发了个人生第一个开源项目
547 阅读
默认分类
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
累计撰写
44
篇文章
累计收到
4
条评论
首页
栏目
默认分类
kafka
JavaScript
linux
java
vue
自建服务
spring
页面
友情链接
搜索到
44
篇与
的结果
2024-11-12
此内容被密码保护
加密文章,请前往内页查看详情
2024年11月12日
2 阅读
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日
16 阅读
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日
1,708 阅读
0 评论
1 点赞
2024-02-04
ubuntu 16.04安装openPai v1.8.0
准备 3台服务器`172.2.17.105 devBox(管理机器,用于部署和配置环境,可以是虚拟机)` `172.2.17.106 master(主节点)` `172.22.17.107 worker(工作机器)`科学上网快帆云 (kfcloud.xyz)三台机器环境安装1.设置源vim /etc/apt/sources.list deb https://mirrors.aliyun.com/ubuntu/ xenial main deb-src https://mirrors.aliyun.com/ubuntu/ xenial main deb https://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates main deb https://mirrors.aliyun.com/ubuntu/ xenial universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial universe deb https://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb https://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security main deb https://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security universe deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable更新源apt-get update安装vimapt-get install vim安装opensshapt-get install openssh-server安装ntpapt-get install ntp设置ssh - root远程vim /etc/ssh/sshd_config #设置为yes PermitRootLogin yes #重启ssh systemctl restart ssh安装dockerapt-get remove docker docker-engine docker-ce docker.io apt-get update apt-get install -y apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" apt-get update apt-get install -y docker-ce systemctl start docke设置docker仓库mkdir -p /etc/docker tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://registry.cn-hangzhou.aliyuncs.com"] } EOF systemctl daemon-reload systemctl restart docke更新服务器软件#解决 安装kuberstry 后 master和worker docker 起不来的问题 apt update && sudo apt upgrade -y安装代理 ss/v2ray(二选1)设置ss为允许其他机器连接右键托盘ss图标,勾选允许其他设备连入设置v2ray 允许其他https://oss.abdl.cn/v2ray2.pnghttps://oss.abdl.cn/v2ray1.pnggit 设置代理git config --global http.proxy http://172.17.2.104:10809/ git config --global https.proxy http://172.17.2.104:10809/docker 设置代理vim /etc/systemd/system/docker.service.d/proxy.conf ##新增一下部分 [Service] Environment="HTTP_PROXY=http://172.17.2.104:10809" Environment="HTTPS_PROXY=http://172.17.2.104:10809/" Environment="NO_PROXY="localhost,127.0.0.1,::1" ##重启生效 systemctl daemon-reload systemctl restart dockeopenPai官网安装指导https://openpai.readthedocs.io/拉取代码git clone https://github.com/microsoft/pai.git cd pai git checkout v1.8.0修改配置文件vim contrib/kubespray/config #编辑config.yaml vim config.yaml #编辑layout.yaml vim layout.yamlconfig.yaml user: root password: admin123 docker_image_tag: v1.8.0 mage_repo: "registry.cn-hangzhou.aliyuncs.com" kube_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers" openpai_kubespray_extra_var: pod_infra_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/pause-{{ image_arch }}" dnsautoscaler_image_repo: "docker.io/mirrorgooglecontainers/cluster-proportional-autoscaler-{{ image_arch }}" tiller_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-helm/tiller" registry_proxy_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-registry-proxy" metrics_server_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server-amd64" addon_resizer_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/addon-resizer" dashboard_image_repo: "registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-{{ image_arch }}"layout.yamlmachine-sku: master-machine: # define a machine sku # the resource requirements for all the machines of this sku # We use the same memory format as Kubernetes, e.g. Gi, Mi # Reference: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory mem: 30Gi cpu: # the number of CPU vcores vcore: 6 cpu-machine: mem: 30Gi cpu: vcore: 6 machine-list: - hostname: master # name of the machine, **do not** use upper case alphabet letters for hostname hostip: 172.17.2.106 machine-type: master-machine # only one master-machine supported pai-master: "true" - hostname: worker hostip: 172.17.2.107 machine-type: cpu-machine pai-worker: "true 设置pip清华源参考https://mirrors-i.tuna.tsinghua.edu.cn/help/pypi/pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple安装scheme,kubenetes(解决安装k8s报错)pip install schemepip install kubernetes解决error: command ‘x86\_64-linux-gnu-gcc‘ failed with exit status 1apt-get install build-essential python3-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev安装kubespraycd pai/contrib/kubespray /bin/bash quick-start-kubespray.sh -v安装openPai/bin/bash quick-start-service.sh打开 openPaihttp\://${mapter-ip}其他启动dev-box-quick-start 容器,用于管理集群docker run -itd \ -e COLUMNS=$COLUMNS -e LINES=$LINES -e TERM=$TERM \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ${HOME}/pai-deploy/cluster-cfg:/cluster-configuration \ -v ${HOME}/pai-deploy/kube:/root/.kube \ -v /home/tt/pai:/mnt/pai \ --pid=host \ --privileged=true \ --net=host \ --name=dev-box-quick-start \ openpai/dev-box:v1.8.0进入容器docker exec -it dev-box-quick-start bash获取集群IDcd /pai ./paictl.py config get-id # 将集群中正在使用的设置拉取到一个文件夹中 # 集群设置文件夹包含三个文件: config.yaml, layout.yaml 和 services-configuration.yaml # 其中 config.yaml 在 v1.7.0 版本之前存储于 ~/pai-deploy/cluster-cfg/config.yaml # 如果 <config-folder>中已经有这三个文件了,老的文件将会被覆盖 ./paictl.py config pull -o <config-folder> # 将文件夹中的配置上传到集群内 # 集群设置文件夹应该包含三个文件: config.yaml, layout.yaml 和 services-configuration.yaml # 其中 config.yaml 在 v1.7.0 版本之前存储于 ~/pai-deploy/cluster-cfg/config.yaml # 只有被成功上传的配置才会被应用 ./paictl.py config push -p <config-folder> -m service # 停止所有PAI服务 ./paictl.py service stop # 启动所有PAI服务 ./paictl.py service start # 停止某些PAI服务 ./paictl.py service stop -n <service-name-1> <service-name-2> # 启动某些PAI服务 ./paictl.py service start -n <service-name-1> <service-name-2>修改webportal并打包构建docker镜像(1,记得把webportal.common.dockerfile挪到上级目录,命令最后一个点别忘了) docker build -t webportal-ab:v1 -f webportal.common.dockerfile . 构建docker镜像(2) python build/pai_build.py build -s webportal -c /cluster-configuration/ docker 打标签 docker tag webportal:lateset abdulla1992/webportal-ab:v12 推送镜像 docker push abdulla1992/webportal-ab:v13 直接编辑k8s容器启动脚本 kubectl edit ds webportal-ds其他问题1.ssh 卡住重启所有节点ssh 服务systemctl ssh restart
2024年02月04日
140 阅读
0 评论
0 点赞
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日
129 阅读
0 评论
0 点赞
1
2
...
9