百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术教程 > 正文

使用Ollama 部署deepseek-r1 实现本地知识库

suiw9 2025-02-20 17:49 9 浏览 0 评论

1、Ollama简介

1.1、概要

Ollama 是一个基于 Go 语言开发的简单易用的本地大语言模型运行框架,可以将它类比为 Docker

1.2、GitHub 地址

https://github.com/ollama/ollama
# 模型库
https://ollama.com/library

2、 install

curl -fsSL https://ollama.com/install.sh | sh

3、ollama 命令

3.1、命令行语法

Usage:
  ollama [flags]
  ollama [command]

Available Commands:
  serve       Start ollama
  create      Create a model from a Modelfile
  show        Show information for a model      
  run         Run a model
  stop        Stop a running model
  pull        Pull a model from a registry
  push        Push a model to a registry
  list        List models
  ps          List running models
  cp          Copy a model
  rm          Remove a model
  help        Help about any command

Flags:
  -h, --help      help for ollama
  -v, --version   Show version information

3.2、查看Ollama状态

systemctl status ollama
# /etc/systemd/system/default.target.wants/ollama.service

3.3、启动Ollama

sudo systemctl start ollama

3.4、自定义配置

sudo systemctl edit ollama
#或者 创建手动创建覆盖文件 /etc/systemd/system/ollama.service.d/override.conf

3.5、升级

curl -fsSL https://ollama.com/install.sh | sh

3.6、查看运行日志

journalctl -e -u ollama

3.7、卸载Ollama

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service

3.8、允许外网访问 Ollama

vim /etc/systemd/system/default.target.wants/ollama.service
#
[Service]
Type=simple
User=
WorkingDirectory=/path/to/ollama
ExecStart=/usr/bin/ollama serve
Restart=on-failure
Environment="OLLAMA_HOST=0.0.0.0:11434" #增加该配置

4、模型

注意:

8GB 内存运行 7B模型,16GB运行 13B模型,32GB运行 33B模型

You should have at least 8 GB of RAM available to run the 7B models, 16 GB to run the 13B models, and 32 GB to run the 33B models.

Ollama supports a list of models available on ollama.com/library

Model

Parameters

Size

Download

Llama 3.3

70B

43GB

ollama run llama3.3

Llama 3.2

3B

2.0GB

ollama run llama3.2

Llama 3.2

1B

1.3GB

ollama run llama3.2:1b

Llama 3.2 Vision

11B

7.9GB

ollama run llama3.2-vision

Llama 3.2 Vision

90B

55GB

ollama run llama3.2-vision:90b

Llama 3.1

8B

4.7GB

ollama run llama3.1

Llama 3.1

405B

231GB

ollama run llama3.1:405b

Phi 4

14B

9.1GB

ollama run phi4

Phi 3 Mini

3.8B

2.3GB

ollama run phi3

Gemma 2

2B

1.6GB

ollama run gemma2:2b

Gemma 2

9B

5.5GB

ollama run gemma2

Gemma 2

27B

16GB

ollama run gemma2:27b

Mistral

7B

4.1GB

ollama run mistral

Moondream 2

1.4B

829MB

ollama run moondream

Neural Chat

7B

4.1GB

ollama run neural-chat

Starling

7B

4.1GB

ollama run starling-lm

Code Llama

7B

3.8GB

ollama run codellama

Llama 2 Uncensored

7B

3.8GB

ollama run llama2-uncensored

LLaVA

7B

4.5GB

ollama run llava

Solar

10.7B

6.1GB

ollama run solar

5、社区集成

5.1、Web & Desktop

  • Open WebUI
  • Enchanted (macOS native)
  • Hollama
  • Lollms-Webui
  • LibreChat
  • Bionic GPT
  • HTML UI
  • Saddle
  • Chatbot UI
  • Chatbot UI v2
  • Typescript UI
  • Minimalistic React UI for Ollama Models
  • Ollamac
  • big-AGI
  • Cheshire Cat assistant framework
  • Amica
  • chatd
  • Ollama-SwiftUI
  • Dify.AI
  • MindMac
  • NextJS Web Interface for Ollama
  • Msty
  • Chatbox
  • WinForm Ollama Copilot
  • NextChat with Get Started Doc
  • Alpaca WebUI
  • OllamaGUI
  • OpenAOE
  • Odin Runes
  • LLM-X (Progressive Web App)
  • AnythingLLM (Docker + MacOs/Windows/Linux native app)
  • Ollama Basic Chat: Uses HyperDiv Reactive UI
  • Ollama-chats RPG
  • IntelliBar (AI-powered assistant for macOS)
  • QA-Pilot (Interactive chat tool that can leverage Ollama models for rapid understanding and navigation of GitHub code repositories)
  • ChatOllama (Open Source Chatbot based on Ollama with Knowledge Bases)
  • CRAG Ollama Chat (Simple Web Search with Corrective RAG)
  • RAGFlow (Open-source Retrieval-Augmented Generation engine based on deep document understanding)
  • StreamDeploy (LLM Application Scaffold)
  • chat (chat web app for teams)
  • Lobe Chat with Integrating Doc
  • Ollama RAG Chatbot (Local Chat with multiple PDFs using Ollama and RAG)
  • BrainSoup (Flexible native client with RAG & multi-agent automation)
  • macai (macOS client for Ollama, ChatGPT, and other compatible API back-ends)
  • RWKV-Runner (RWKV offline LLM deployment tool, also usable as a client for ChatGPT and Ollama)
  • Ollama Grid Search (app to evaluate and compare models)
  • Olpaka (User-friendly Flutter Web App for Ollama)
  • OllamaSpring (Ollama Client for macOS)
  • LLocal.in (Easy to use Electron Desktop Client for Ollama)
  • Shinkai Desktop (Two click install Local AI using Ollama + Files + RAG)
  • AiLama (A Discord User App that allows you to interact with Ollama anywhere in discord )
  • Ollama with Google Mesop (Mesop Chat Client implementation with Ollama)
  • R2R (Open-source RAG engine)
  • Ollama-Kis (A simple easy to use GUI with sample custom LLM for Drivers Education)
  • OpenGPA (Open-source offline-first Enterprise Agentic Application)
  • Painting Droid (Painting app with AI integrations)
  • Kerlig AI (AI writing assistant for macOS)
  • AI Studio
  • Sidellama (browser-based LLM client)
  • LLMStack (No-code multi-agent framework to build LLM agents and workflows)
  • BoltAI for Mac (AI Chat Client for Mac)
  • Harbor (Containerized LLM Toolkit with Ollama as default backend)
  • PyGPT (AI desktop assistant for Linux, Windows and Mac)
  • Alpaca (An Ollama client application for linux and macos made with GTK4 and Adwaita)
  • AutoGPT (AutoGPT Ollama integration)
  • Go-CREW (Powerful Offline RAG in Golang)
  • PartCAD (CAD model generation with OpenSCAD and CadQuery)
  • Ollama4j Web UI - Java-based Web UI for Ollama built with Vaadin, Spring Boot and Ollama4j
  • PyOllaMx - macOS application capable of chatting with both Ollama and Apple MLX models.
  • Claude Dev - VSCode extension for multi-file/whole-repo coding
  • Cherry Studio (Desktop client with Ollama support)
  • ConfiChat (Lightweight, standalone, multi-platform, and privacy focused LLM chat interface with optional encryption)
  • Archyve (RAG-enabling document library)
  • crewAI with Mesop (Mesop Web Interface to run crewAI with Ollama)
  • Tkinter-based client (Python tkinter-based Client for Ollama)
  • LLMChat (Privacy focused, 100% local, intuitive all-in-one chat interface)
  • Local Multimodal AI Chat (Ollama-based LLM Chat with support for multiple features, including PDF RAG, voice chat, image-based interactions, and integration with OpenAI.)
  • ARGO (Locally download and run Ollama and Huggingface models with RAG on Mac/Windows/Linux)
  • OrionChat - OrionChat is a web interface for chatting with different AI providers
  • G1 (Prototype of using prompting strategies to improve the LLM's reasoning through o1-like reasoning chains.)
  • Web management (Web management page)
  • Promptery (desktop client for Ollama.)
  • Ollama App (Modern and easy-to-use multi-platform client for Ollama)
  • SpaceLlama (Firefox and Chrome extension to quickly summarize web pages with ollama in a sidebar)
  • YouLama (Webapp to quickly summarize any YouTube video, supporting Invidious as well)
  • DualMind (Experimental app allowing two models to talk to each other in the terminal or in a web interface)
  • ollamarama-matrix (Ollama chatbot for the Matrix chat protocol)
  • ollama-chat-app (Flutter-based chat app)
  • Perfect Memory AI (Productivity AI assists personalized by what you have seen on your screen, heard and said in the meetings)
  • Hexabot (A conversational AI builder)
  • Reddit Rate (Search and Rate Reddit topics with a weighted summation)
  • OpenTalkGpt (Chrome Extension to manage open-source models supported by Ollama, create custom models, and chat with models from a user-friendly UI)
  • VT (A minimal multimodal AI chat app, with dynamic conversation routing. Supports local models via Ollama)
  • Nosia (Easy to install and use RAG platform based on Ollama)
  • Witsy (An AI Desktop application available for Mac/Windows/Linux)
  • Abbey (A configurable AI interface server with notebooks, document storage, and YouTube support)
  • Minima (RAG with on-premises or fully local workflow)
  • aidful-ollama-model-delete (User interface for simplified model cleanup)
  • Perplexica (An AI-powered search engine & an open-source alternative to Perplexity AI)
  • AI Toolkit for Visual Studio Code (Microsoft-official VSCode extension to chat, test, evaluate models with Ollama support, and use them in your AI applications.)
  • MinimalNextOllamaChat (Minimal Web UI for Chat and Model Control)
  • Chipper AI interface for tinkerers (Ollama, Haystack RAG, Python)

6、hollama安装

6.1、官方地址

https://kkgithub.com/fmaclen/hollama

6.2 hollama 配置

7、deepseek 安装

ollama run deepseek-r1:14b

8、使用 hollama 调用deepseek 模型

8.1 、调用deepseek 模型

8.2 、创建本地知识库

8.2.1、创建知识

8.2.2 、调用本地知识库

相关推荐

Qt编程进阶(99):使用OpenGL绘制三维图形

一、Qt中的OpenGL支持...

OpenGL基础图形编程(七)建模(opengl教程48讲)

七、OpenGL建模  OpenGL基本库提供了大量绘制各种类型图元的方法,辅助库也提供了不少描述复杂三维图形的函数。这一章主要介绍基本图元,如点、线、多边形,有了这些图元,就可以建立比较复杂的模型了...

ffmpeg cv:Mat编码成H265数据流(ffmpeg编码mp4视频)

流程下面附一张使用FFmpeg编码视频的流程图。使用该流程,不仅可以编码H.264的视频,而且可以编码MPEG4/MPEG2/VP8等等各种...

986g超轻酷睿本,联想ThinkPad X1 Carbon 2025 Aura评测

今年3月份,联想首发了搭载Intel酷睿Ultra移动平台的ThinkPadX1CarbonGen12轻薄本,其续航表现令人惊喜。时隔9个月,IT之家收到了ThinkPad...

拆解五六年前的国产平板,这做工!

之前在论坛有幸运得被抽到奖,就是猎奇手机镜头,到手的时候玩了下鱼眼和广角微距,效果见图,用手机拍的那么就进入正题来说下拆鸡过程,外壳我就不拍出来了,免得打广告之嫌,拆出背面外壳就出现了一个裸板。第...

什么是闭合GOP和开放GOP?(闭合式和开放式区分)

翻译|Alex技术审校|李忠本文来自OTTVerse,作者为KrishnaRaoVijayanagar。...

拆解五六年前的国产平板(国产平板怎么拆开)

之前在论坛有幸运得被抽到奖,就是猎奇手机镜头,到手的时候玩了下鱼眼和广角微距,效果见图,用手机拍的那么就进入正题来说下拆鸡过程,外壳我就不拍出来了,免得打广告之嫌,拆出背面外壳就出现了一个裸板。第...

如何使用PSV播放MP4 视频自动退出怎么办

作者:iamwin来源:巴士论坛(点此进入)看到有很多同学在为psv无法播放视频而困扰,自己研究了下,发一个可以解决PSV出现播放视频播放到一半就跳出的问题。就是这个问题:首先,请大家先升级到版本≥1...

2023-03-21:音视频解混合(demuxer)为MP3和H264...

2023-03-21:音视频解混合(demuxer)为MP3和H264,用go语言编写。答案2023-03-21:...

FFmpeg解码H264及swscale缩放详解

本文概要:...

CasaOS保姆级喂饭教程!网心云OEC-Turbo安装CasaOS系统固件!

本内容来源于@什么值得买APP,观点仅代表作者本人|作者:柒叶君...

Firefox 33将整合思科开源编解码器OpenH264

思科去年在BSD许可证下开源了支持H.264编解码的OpenH264,Mozilla则在当时宣布将在Firefox中整合思科的二进制模块。现在,最新的FirefoxNightly(Firefox3...

为什么传输视频流的时候需要将YUV编码成H.264?

首先开始的时候我们借用一张雷神的图帮助大家理解一下从上图可以看出我们要做的,就是将像素层的YUV格式,编码出编码层的h264数据。...

FFmpeg学习(1)开篇(ffmpeg开发教程)

FFmpeg学习(1)开篇...

喜欢看视频必须了解 AV1编码那点事

喜欢看视频的小伙伴大概都有点感觉,AV1这个不太熟悉的视频格式,最近闹出的事情可不少,比如视频网站为了节约带宽偷偷默认使用AV1格式,让电脑狂转;比如Intel专门给旧CPU发布了相关工具;再比如GP...

取消回复欢迎 发表评论: