【deepseek】本地部署+webui访问

背景

最近deepseek很火,但是官网的老是被限流使用,还有就是自己也想着玩一玩,于是准备在自己电脑跑一个

直接附上结果地址mydeepseek

准备工作

windows和linux都可

  • 我这里选择linux,ubuntu系统

安装ollama

  • 看下图,直接复制,在自己电脑终端执行,等待即可
  • 等待下载完成

安装模型

  • 如下图,选择自己电脑能带动的模型直接run,就会下载上
  • 然后就可以在终端与deepseek进行交互了
  • 也可以安装多个模型,相同的操作,使用ollama run deepseek-r1:对应的版本即可

终端使用毕竟不方便,于是将其发布出来使用webui进行使用

  • 我这里选择的open-webui
  • 我这里直接根据官方文档使用docker启动docker run -d --network host -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main,当然网络做了自己的更改,没有使用官网的
  • 这样之后你就可以通过http://localhost:8080进行使用了

发布到公网

下面附上nginx配置ssl配置参考文章

conf 复制代码
 server{
    listen 80;
    server_name deepseek.douwen.top;# 我的公网域名
    listen 443 ssl; # managed by Certbot
    server_name deepseek.douwen.top; # 我的公网域名
    ssl_certificate /etc/letsencrypt/live/deepseek.douwen.top/fullchain.pem; # managed by Certbot 我的自签证书
    ssl_certificate_key /etc/letsencrypt/live/deepseek.douwen.top/privkey.pem; # managed by Certbot  我的自签证书私钥
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 支持ssl的nginx配置
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://192.168.3.27:8080;  # 代理到内网服务 open-webui访问地址
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_connect_timeout 30s;  # 连接后端服务器的超时时间
        proxy_send_timeout 60s;     # 发送请求到后端的超时时间
        proxy_read_timeout 120s;    # 等待后端服务器响应的超时时间
    }

}
相关推荐
LN花开富贵16 小时前
Ubuntu aarch64 架构安装 NoMachine 远程控制 避坑与实战
linux·运维·笔记·学习·ubuntu·嵌入式
取经蜗牛16 小时前
Windows 11 WSL + Ubuntu 24.04 安装指南
linux·windows·ubuntu
bush420 小时前
linux开发板连接virtualbox虚拟机ubuntu的usb网卡,访问外网方法。
linux·运维·ubuntu
大明者省21 小时前
完整 Ubuntu 服务器 XFCE 桌面 + XRDP 远程桌面 部署使用全流程
运维·服务器·ubuntu
Irene19911 天前
在 WSL Ubuntu 上安装和使用 Hive
linux·hive·ubuntu
ZGUIZ1 天前
Ubuntu 25.10 蓝牙Wifi不可用解决流程
linux·运维·ubuntu
Irene19911 天前
Windows 11 WSL Ubuntu 环境:安装 Hadoop 完整指南
hadoop·ubuntu
勤自省1 天前
ROS2 + OpenCV 实战教程:人脸识别、物体跟踪、ArUco 二维码识别初级
人工智能·opencv·ubuntu·计算机视觉·ros2
野熊佩骑2 天前
一文读懂Nginx 之 Ubuntu使用apt方式安装Nginx官方最新版本
linux·运维·服务器·nginx·ubuntu·http
牛肉烧烤屋2 天前
为什么大模型需要“思考模式”?
aigc·ai编程·deepseek