{"id":703,"date":"2025-12-09T18:55:38","date_gmt":"2025-12-09T10:55:38","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=703"},"modified":"2025-12-09T18:55:38","modified_gmt":"2025-12-09T10:55:38","slug":"deepseek-r1-ollama%e6%9c%ac%e5%9c%b0%e5%8c%96%e9%83%a8%e7%bd%b2%e5%85%a8%e6%94%bb%e7%95%a5","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/09\/deepseek-r1-ollama%e6%9c%ac%e5%9c%b0%e5%8c%96%e9%83%a8%e7%bd%b2%e5%85%a8%e6%94%bb%e7%95%a5\/","title":{"rendered":"DeepSeek\u00a0R1\u00a0Ollama\u672c\u5730\u5316\u90e8\u7f72\u5168\u653b\u7565"},"content":{"rendered":"\n<p>\u597d\u7684 \u2014 \u4e0b\u9762\u662f\u6211\u4e3a\u4f60\u6574\u7406\u7684 <strong>\u201cDeepSeek-R1 + Ollama \u672c\u5730\u5316\u90e8\u7f72\u5168\u653b\u7565\u201d<\/strong>\u3002\u4ece\u73af\u5883\u51c6\u5907\u3001\u5b89\u88c5\u3001\u6a21\u578b\u4e0b\u8f7d\u3001\u4f7f\u7528\u3001\u4f18\u5316\u3001\u5e38\u89c1\u95ee\u9898\u5230\u5b89\u5168 \/ \u9690\u79c1\u6ce8\u610f\u4e8b\u9879\uff0c\u4e00\u5e94\u4ff1\u5168 \u2014 \u5982\u679c\u4f60\u6309\u6d41\u7a0b\u8d70\uff0c\u53ef\u4ee5\u6700\u5feb\u90e8\u7f72\u6210\u529f\u5e76\u7a33\u5b9a\u8fd0\u884c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udfaf \u80cc\u666f\u4e0e\u4e3a\u4ec0\u4e48\u7528 Ollama \u90e8\u7f72 DeepSeek-R1<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DeepSeek\u2011R1 \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5927\u8bed\u8a00\u6a21\u578b (LLM)\uff0c\u53ef\u4ee5 locally \u672c\u5730\u90e8\u7f72\uff0c\u4e0d\u4f9d\u8d56\u4e91 API\uff0c\u8fd9\u6837\u6709\u5229\u4e8e <strong>\u6570\u636e\u9690\u79c1 + \u81ea\u4e3b\u63a7\u5236 + \u65e0\u7f51\u7edc\u4f9d\u8d56<\/strong>\u3002(<a href=\"https:\/\/cloud.baidu.com\/article\/3585778?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/li>\n\n\n\n<li>Ollama \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u6a21\u578b\u7ba1\u7406 \/ \u63a8\u7406\u6846\u67b6\uff0c\u652f\u6301\u672c\u5730\u52a0\u8f7d\u591a\u79cd\u6a21\u578b (\u5305\u62ec DeepSeek\u2011R1 \u5404\u7248\u672c)\uff0c\u5e76\u63d0\u4f9b\u547d\u4ee4\u884c \/ REST API \/ \u672c\u5730\u670d\u52a1\u63a5\u53e3\uff0c\u975e\u5e38\u65b9\u4fbf\u96c6\u6210\u8fdb\u81ea\u5df1\u7684\u5e94\u7528\u3002(<a href=\"https:\/\/uday.dev\/posts\/deepseek-r1-locally\/?utm_source=chatgpt.com\">uday.dev<\/a>)<\/li>\n<\/ul>\n\n\n\n<p>\u56e0\u6b64\u901a\u8fc7 Ollama \u90e8\u7f72 DeepSeek\u2011R1\uff0c\u662f\u5f53\u524d\u6700\u63a8\u8350\u7684\u201c\u79c1\u6709\u5316 + \u672c\u5730\u90e8\u7f72 + \u53ef\u63a7 + \u6613\u96c6\u6210\u201d\u65b9\u6848\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u73af\u5883\u51c6\u5907 \u2014\u2014 \u786c\u4ef6 &amp; \u8f6f\u4ef6\u8981\u6c42<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u9879\u76ee<\/th><th>\u6700\u4f4e\u5efa\u8bae<\/th><th>\u63a8\u8350 \/ \u63a8\u8350\u7528\u4e8e\u8f83\u5927\u6a21\u578b<\/th><\/tr><\/thead><tbody><tr><td>\u64cd\u4f5c\u7cfb\u7edf<\/td><td>Linux \/ macOS \/ Windows (WSL2) (<a href=\"https:\/\/cloud.baidu.com\/article\/3585778?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/td><td>Ubuntu 22.04 \/ Windows 10+ \/ macOS 11+<\/td><\/tr><tr><td>CPU \/ \u5185\u5b58<\/td><td>\u652f\u6301 AVX2 + \u2265\u202f8 \u6838 + \u2265\u202f16\u202fGB RAM (<a href=\"https:\/\/cloud.baidu.com\/article\/3585778?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/td><td>16 \u6838 + \u2265\u202f32\u202fGB RAM\uff08\u5927\u578b\u6a21\u578b\uff09<\/td><\/tr><tr><td>\u5b58\u50a8 \/ \u78c1\u76d8\u7a7a\u95f4<\/td><td>\u2265\u202f50\u202fGB \u53ef\u7528 SSD\uff08\u6a21\u578b\u9700\u7a7a\u95f4\uff09 (<a href=\"https:\/\/cloud.baidu.com\/article\/3585778?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/td><td>NVMe SSD, \u2265\u202f200\u202fGB\uff08\u591a\u4e2a\u6a21\u578b +\u7f13\u5b58\uff09<\/td><\/tr><tr><td>GPU (\u53ef\u9009\uff0c\u4f46\u63a8\u8350)<\/td><td>\u2014<\/td><td>NVIDIA GPU + CUDA + \u652f\u6301 8\u202fGB+ VRAM\uff0c\u7528\u4e8e\u52a0\u901f\u63a8\u7406 (<a href=\"https:\/\/deepseek.csdn.net\/67d0f5a2807ce562bfdee4f4.html?utm_source=chatgpt.com\">DeepSeek<\/a>)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\u8bf4\u660e<\/strong>\uff1a\u5373\u4f7f\u6ca1\u6709 GPU\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 CPU \u63a8\u7406\uff0c\u4f46\u901f\u5ea6\u4f1a\u6162\u5f88\u591a\u3002\u82e5\u4f60\u8ffd\u6c42\u54cd\u5e94\u901f\u5ea6\u3001\u8f83\u5927\u4e0a\u4e0b\u6587\u7a97\u53e3\u6216\u9ad8\u541e\u5410\uff0cGPU \u975e\u5e38\u6709\u5fc5\u8981\u3002<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udee0 \u5b89\u88c5 Ollama + \u83b7\u53d6 DeepSeek\u2011R1 \u6a21\u578b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5b89\u88c5 Ollama<\/h3>\n\n\n\n<p>\u5728\u7ec8\u7aef\u6267\u884c\uff08\u4ee5 Linux\/macOS \u4e3a\u4f8b\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -fsSL https:\/\/ollama.com\/install.sh | sh\n\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u68c0\u67e5\u7248\u672c\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama --version\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u6b63\u786e\u663e\u793a\u7248\u672c\u53f7\uff0c\u5373\u8868\u793a\u5b89\u88c5\u6210\u529f\u3002(<a href=\"https:\/\/uday.dev\/posts\/deepseek-r1-locally\/?utm_source=chatgpt.com\">uday.dev<\/a>)<\/p>\n\n\n\n<p>\u5bf9\u4e8e Windows\uff0c\u53ef\u4ece\u5b98\u65b9\u9875\u9762\u4e0b\u8f7d\u5b89\u88c5\u5305\u5e76\u6309\u5411\u5bfc\u5b89\u88c5\u3002(<a href=\"https:\/\/deepseek.csdn.net\/67ab1c9d79aaf67875cb9735.html?utm_source=chatgpt.com\">DeepSeek<\/a>)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u62c9\u53d6 DeepSeek\u2011R1 \u6a21\u578b<\/h3>\n\n\n\n<p>Ollama \u652f\u6301\u591a\u4e2a\u7248\u672c (\u4f8b\u5982 7B, 14B, \u2026)\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u786c\u4ef6\u9009\u62e9\u5408\u9002\u5927\u5c0f\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama pull deepseek-r1:7b      # \u62c9\u53d6 7B \u7248\u672c\nollama pull deepseek-r1:14b     # \u62c9\u53d6 14B \u7248\u672c\uff08\u9700\u66f4\u597d\u7684\u786c\u4ef6\uff09\n# \u5982\u679c\u6709\u8db3\u591f\u8d44\u6e90\uff0c\u4e5f\u53ef\u4ee5\u62c9\u53d6\u66f4\u5927\u6a21\u578b\n\n<\/pre><\/div>\n\n\n<p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama list\n\n<\/pre><\/div>\n\n\n<p>\u4f60\u5c06\u770b\u5230\u672c\u5730\u5df2\u7ecf\u4e0b\u8f7d\u5e76\u53ef\u7528\u7684\u6a21\u578b\u5217\u8868\u3002(<a href=\"https:\/\/cloud.baidu.com\/article\/4580282?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u542f\u52a8\u6a21\u578b \/ \u672c\u5730\u670d\u52a1<\/h3>\n\n\n\n<p>\u547d\u4ee4\u793a\u4f8b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama run deepseek-r1:7b\n\n<\/pre><\/div>\n\n\n<p>\u8fd9\u5c06 <strong>\u542f\u52a8 DeepSeek\u2011R1 \u6a21\u578b\u5e76\u5728\u672c\u5730\u8fd0\u884c\u63a8\u7406\u670d\u52a1 \/ REPL \u754c\u9762<\/strong>\u3002(<a href=\"https:\/\/uday.dev\/posts\/deepseek-r1-locally\/?utm_source=chatgpt.com\">uday.dev<\/a>)<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u66b4\u9732 API \u4f9b\u5176\u4ed6\u5e94\u7528\u8c03\u7528\uff0c\u53ef\u4ee5\u7528\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama serve\n\n<\/pre><\/div>\n\n\n<p>\u8fd9\u6837 Ollama \u4f1a\u542f\u52a8\u4e00\u4e2a HTTP REST \u63a5\u53e3\uff08\u9ed8\u8ba4\u7aef\u53e3\u901a\u5e38\u4e3a 11434\uff09\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7 curl\u3001Python\u3001Postman \u7b49\u65b9\u5f0f\u8c03\u7528\u3002(<a href=\"https:\/\/www.voiceflow.com\/blog\/how-to-run-deepseek-r1-locally?utm_source=chatgpt.com\">voiceflow.com<\/a>)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udce1 \u5982\u4f55\u8c03\u7528 &amp; \u96c6\u6210 DeepSeek\u2011R1 \u670d\u52a1<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcbb \u2460 \u7ec8\u7aef\u4ea4\u4e92 (REPL \/ CLI)<\/h3>\n\n\n\n<p>\u542f\u52a8\u540e\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u7ec8\u7aef\u8f93\u5165 prompt\uff0c\u4e0e\u6a21\u578b\u5bf9\u8bdd\uff0c\u975e\u5e38\u9002\u5408\u8c03\u8bd5\u3001\u6d4b\u8bd5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd17 \u2461 REST API \u8c03\u7528 (\u4f8b\u5982 curl)<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl http:\/\/localhost:11434\/api\/chat -d &#039;{\n  &quot;model&quot;: &quot;deepseek-r1:7b&quot;,\n  &quot;messages&quot;: &#x5B;\n    { &quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;What is the capital of France?&quot; }\n  ],\n  &quot;stream&quot;: false\n}&#039;\n\n<\/pre><\/div>\n\n\n<p>Ollama \u4f1a\u8fd4\u56de JSON \u54cd\u5e94\uff0c\u5305\u62ec\u6a21\u578b\u56de\u590d\u5185\u5bb9\u3002(<a href=\"https:\/\/www.datacamp.com\/tutorial\/deepseek-r1-ollama?utm_source=chatgpt.com\">DataCamp<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udc0d \u2462 Python \u96c6\u6210\u8c03\u7528<\/h3>\n\n\n\n<p>\u5b89\u88c5 Python \u5e93\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npip install ollama\n\n<\/pre><\/div>\n\n\n<p>\u7136\u540e\u5728 Python \u4e2d\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport ollama\n\nresp = ollama.chat(model=&quot;deepseek-r1:7b&quot;, messages=&#x5B;{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;Hello&quot;}])\nprint(resp)\n\n<\/pre><\/div>\n\n\n<p>\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u6a21\u578b\u96c6\u6210\u8fdb\u4f60\u7684\u5e94\u7528\u3001\u670d\u52a1\u6216\u811a\u672c\u4e2d\u3002(<a href=\"https:\/\/www.datacamp.com\/tutorial\/deepseek-r1-ollama?utm_source=chatgpt.com\">DataCamp<\/a>)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2699\ufe0f \u6027\u80fd\u4f18\u5316 &amp; \u53c2\u6570\u8c03\u6574\u5efa\u8bae<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u4f60\u6709 GPU\uff0c\u53ef\u52a0\u53c2\u6570\u542f\u7528 GPU \u52a0\u901f\uff0c\u4f8b\u5982 <code>--num-gpu 1<\/code> \u6216\u6307\u5b9a <code>--gpu-layers<\/code>\u3002(<a href=\"https:\/\/cloud.baidu.com\/article\/4580282?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/li>\n\n\n\n<li>\u82e5 VRAM \/ \u5185\u5b58\u6709\u9650\uff0c\u53ef\u4f7f\u7528\u91cf\u5316\u6216\u8f83\u5c0f\u7248\u672c\u6a21\u578b (7B \/ 14B) \u4ee5\u51cf\u8f7b\u8d44\u6e90\u538b\u529b\u3002(<a href=\"https:\/\/cloud.baidu.com\/article\/3585778?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/li>\n\n\n\n<li>\u5f53\u5185\u5b58\/\u663e\u5b58\u4ecd\u6709\u9650\u65f6\uff0cOllama \u4f1a\u5c06\u90e8\u5206\u6570\u636e\u843d\u56de\u7cfb\u7edf RAM\uff0c\u4f46\u6027\u80fd\u4f1a\u660e\u663e\u4e0b\u964d\uff0c\u9700\u8981\u5408\u7406\u8bbe\u7f6e <code>num_cpu<\/code> \/ \u7ebf\u7a0b\u6570 \/ batch size\u3002(<a href=\"https:\/\/cloud.baidu.com\/article\/3793009?utm_source=chatgpt.com\">\u767e\u5ea6\u667a\u80fd\u4e91<\/a>)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd04 \u5e38\u89c1\u95ee\u9898 &amp; \u6392\u67e5\u5efa\u8bae<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u95ee\u9898<\/th><th>\u53ef\u80fd\u539f\u56e0<\/th><th>\u89e3\u51b3\u601d\u8def<\/th><\/tr><\/thead><tbody><tr><td>\u6a21\u578b\u52a0\u8f7d\u5931\u8d25 \/ \u5185\u5b58\u4e0d\u8db3<\/td><td>\u663e\u5b58 \/ RAM \u4e0d\u591f<\/td><td>\u4f7f\u7528\u66f4\u5c0f\u6a21\u578b \/ \u589e\u52a0\u4ea4\u6362\u7a7a\u95f4 \/ \u964d\u4f4e batch size \/ \u4f7f\u7528\u91cf\u5316\u7248\u672c<\/td><\/tr><tr><td>\u54cd\u5e94\u8fdf\u7f13 \/ \u5361\u987f<\/td><td>\u65e0 GPU \/ CPU \u63a8\u7406\u6162<\/td><td>\u5c3d\u91cf\u542f\u7528 GPU \u52a0\u901f\uff0c\u6216\u7528\u8f83\u5c0f\u6a21\u578b<\/td><\/tr><tr><td>API \u65e0\u54cd\u5e94 \/ \u8fde\u63a5\u5931\u8d25<\/td><td>Ollama \u670d\u52a1\u672a\u542f\u52a8 \/ \u7aef\u53e3\u88ab\u5360\u7528<\/td><td>\u786e\u8ba4 <code>ollama serve<\/code> \u6b63\u5728\u8fd0\u884c\uff1b\u68c0\u67e5\u7f51\u7edc\u9632\u706b\u5899 \/ \u7aef\u53e3<\/td><\/tr><tr><td>\u4e0b\u8f7d\u6a21\u578b\u5931\u8d25<\/td><td>\u7f51\u7edc\u95ee\u9898 \/ \u8d85\u65f6<\/td><td>\u5207\u6362\u7f51\u7edc \/ \u4f7f\u7528\u7a33\u5b9a\u5e26\u5bbd \/ \u591a\u6b21\u5c1d\u8bd5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u90e8\u5206\u7528\u6237\u53cd\u9988\uff08\u8bd1\u6210\u4e2d\u6587\uff09\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u201c\u7528 RTX\u202f3090 + Ollama \u542f\u52a8 7B \u6a21\u578b\u901f\u5ea6\u8fd8\u4e0d\u9519\uff1b\u4f46\u5927\u6a21\u578b\uff08\u5982 &gt;\u202f32B\uff09\u5728\u4ec5 CPU \u65f6\u6548\u679c\u5f88\u5dee\u3002\u201d(<a href=\"https:\/\/www.reddit.com\/r\/ollama\/comments\/1i8zs2g?utm_source=chatgpt.com\">Reddit<\/a>)<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd12 \u9690\u79c1 \/ \u5b89\u5168 \/ \u5408\u89c4\u8003\u91cf<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u672c\u5730\u90e8\u7f72\u610f\u5473\u7740<strong>\u6240\u6709\u8f93\u5165 \/ \u8f93\u51fa\u90fd\u7559\u5728\u672c\u5730<\/strong>\uff0c\u4e0d\u4f1a\u88ab\u4e0a\u4f20\u5230\u4e91\u7aef \u2192 \u6781\u5927\u589e\u5f3a<strong>\u6570\u636e\u9690\u79c1\u4e0e\u5408\u89c4\u6027<\/strong>\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u4e3a\u591a\u4eba\u6216\u4f01\u4e1a\u90e8\u7f72\uff0c\u5efa\u8bae\u524d\u7f6e <strong>\u53cd\u5411\u4ee3\u7406 + TLS + \u8bbf\u95ee\u63a7\u5236\uff08IP \u767d\u540d\u5355 \/ \u8ba4\u8bc1\uff09<\/strong>\uff0c\u9632\u6b62\u672a\u7ecf\u6388\u6743\u8bbf\u95ee\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8e\u654f\u611f\u6216\u79c1\u4eba\u6570\u636e\uff0c\u907f\u514d\u5728\u65e0\u52a0\u5bc6 \/ \u516c\u5171\u7f51\u7edc\u4e0b\u66b4\u9732 REST API\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddea \u793a\u4f8b\uff1a\u4ece\u96f6\u5f00\u59cb\u5b8c\u6574\u6d41\u7a0b (Ubuntu \u793a\u4f8b)<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u5b89\u88c5 Ollama\ncurl -fsSL https:\/\/ollama.com\/install.sh | sh\n\n# \u62c9\u53d6 DeepSeek\u2011R1 (7B)\nollama pull deepseek-r1:7b\n\n# \u542f\u52a8\u6a21\u578b\nollama run deepseek-r1:7b\n\n# \u6216\u542f\u52a8\u4e3a REST \u670d\u52a1\nollama serve\n\n# \u7528 curl \u6d4b\u8bd5\ncurl http:\/\/localhost:11434\/api\/chat -d &#039;{\n  &quot;model&quot;:&quot;deepseek-r1:7b&quot;,\n  &quot;messages&quot;:&#x5B;{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;Explain quantum computing in Chinese&quot;}],\n  &quot;stream&quot;:false\n}&#039;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udfaf \u9002\u5408\u54ea\u4e9b\u4f7f\u7528\u573a\u666f<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u516c\u53f8\/\u56e2\u961f\u5185\u90e8\u77e5\u8bc6\u5e93 + \u79c1\u6709\u95ee\u7b54\u7cfb\u7edf<\/li>\n\n\n\n<li>\u672c\u5730\u4ee3\u7801 \/ \u6587\u6863\u52a9\u624b \/ IDE \u63d2\u4ef6\u8f85\u52a9<\/li>\n\n\n\n<li>\u79bb\u7ebf\u73af\u5883\u6216\u5bf9\u9690\u79c1\u9ad8\u5ea6\u654f\u611f\u7684\u573a\u666f<\/li>\n\n\n\n<li>AI \u6559\u80b2 \/ \u7814\u7a76 \/ Proof\u2011of\u2011Concept (PoC) \u73af\u5883<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u597d\u7684 \u2014 \u4e0b\u9762\u662f\u6211\u4e3a\u4f60\u6574\u7406\u7684 \u201cDeepSeek-R1 + Ollama \u672c\u5730\u5316&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/09\/deepseek-r1-ollama%e6%9c%ac%e5%9c%b0%e5%8c%96%e9%83%a8%e7%bd%b2%e5%85%a8%e6%94%bb%e7%95%a5\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=703"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/703\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}