【ai技术】(4):在树莓派上,使用qwen0.5b大模型+chatgptweb,搭建本地大模型聊天环境,速度飞快,非常不错!

1,视频地址

https://www.bilibili.com/video/BV1VK421i7CZ/

【ai技术】(4):在树莓派4上,使用ollama部署qwen0.5b大模型+chatgptweb前端界面,搭建本地大模型聊天工具,速度飞快

2,下载镜像 raspberry-pi-os-64-bit

https://blog.csdn.net/freewebsys/article/details/136921703

项目地址:
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

3,在raspberrypi 4 上安装docker和docker-compose

https://docs.docker.com/engine/install/debian/

设置docker 的源:

bash 复制代码
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

替换成 阿里 源:

bash 复制代码
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list

安装docker 和 docker-compose 命令

bash 复制代码
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

经过漫长等等,就可以安装成功了:

bash 复制代码
Setting up docker-ce-rootless-extras (5:26.0.0-1~debian.12~bookworm) ...
Setting up slirp4netns (1.2.0-1) ...
Setting up iptables (1.8.9-2) ...
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up docker-ce (5:26.0.0-1~debian.12~bookworm) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Setting up git (1:2.39.2-1.1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u4) ...


docker -v
Docker version 26.0.0, build 2ae903e

特别注意是 docker-compose-linux-armv7 版本,linux版本。

bash 复制代码
sudo curl -SL https://mirror.ghproxy.com/https://github.com/docker/compose/releases/download/v2.25.0/docker-compose-linux-armv7 -o /usr/local/bin/docker-compose

#然后授权
sudo chmod 755 /usr/local/bin/docker-compose
docker-compose -v
Docker Compose version v2.25.0

建议切换成百度的镜像:

bash 复制代码
{
   "registry-mirrors": 
	[ "https://mirror.baidubce.com" ] 
}

4,下载项目ollama-chatgpt-web并启动

bash 复制代码
git clone https://gitee.com/fly-llm/ollama-chatgpt-web.git
cd ollama-chatgpt-web
docker-compose up -d
相关推荐
福大大架构师每日一题3 天前
ollama v0.20.7 最新版更新详解:ROCm 7.2.1、Gemma4 渲染修复与多项 Metal/Renderer 回归修补
人工智能·数据挖掘·回归·ollama
EdmundXjs4 天前
Claude+qwen3-vl:8B HTTP交互信息解释
http·claude·ollama·qwen3
天月风沙5 天前
Betaflight飞控、树莓派RP2350B主控编译教程
linux·单片机·嵌入式硬件·mcu·无人机·树莓派
MIXLLRED7 天前
解决:RealSense D435 在树莓派4B(Ubuntu 22.04 + ROS2 Humble)上的权限与驱动问题完整复盘
linux·ubuntu·树莓派·realsense d400
熊猫钓鱼>_>7 天前
私有化AI视频助手搭建实录:当Ollama遇上OpenClaw
人工智能·音视频·agent·qwen·ollama·openclaw·happyhorse-1.0
书香门第8 天前
搭建免费的Ollama AI Agent
人工智能·python·ollama
devpotato8 天前
人工智能(六)- Spring AI 调用Ollama本地大模型
人工智能·ollama
Cachel wood8 天前
Macbook M4 pro本地部署大模型|Ollama+Gemma4/Qwen3.5
人工智能·python·自动化·llm·qwen·ollama·gemma4
シ風箏8 天前
Ollama【部署 07】搭建本地智能体的简单说明(局域网离线部署Ollama+模型迁移+Docker部署AnythingLLM)
docker·anythingllm·ollama·本地智能体·离线模型迁移
Navicat中国8 天前
如何使用 Ollama 配置 AI 助手 | Navicat 教程
数据库·人工智能·ai·navicat·ollama