{"id":496145,"date":"2026-09-25T23:56:25","date_gmt":"2026-09-25T23:56:25","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=496145"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=496145","title":{"rendered":"\u0421\u0432\u043e\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0434\u043e\u043c\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043c\u0438\u0440\u0430"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c33\/329\/680\/c333296809f1489f72ca70df754cd87a.jpg\" width=\"500\" height=\"500\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c33\/329\/680\/c333296809f1489f72ca70df754cd87a.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c33\/329\/680\/c333296809f1489f72ca70df754cd87a.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u0434\u043e\u0435\u043b\u0438 \u043b\u0438\u043c\u0438\u0442\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0440\u043e\u0436\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0414\u043e\u043c\u0430 \u0441\u0442\u043e\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0439? \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0439 LLM-\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<h3>\u0416\u0435\u043b\u0435\u0437\u043e<\/h3>\n<ul>\n<li>\n<p><strong>CPU 8 \u044f\u0434\u0435\u0440, 32 \u0413\u0411 RAM<\/strong> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0436\u0438\u0432\u0451\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>GPU \u043d\u0430 12 \u0413\u0411<\/strong> \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u0435\u043d: \u0441 \u043d\u0438\u043c 7\u20138B \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0435\u0442\u0430\u044e\u0442. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 CPU, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>1. \u0421\u0442\u0430\u0432\u0438\u043c Ollama<\/h3>\n<p>\u00abDocker \u0434\u043b\u044f LLM\u00bb: \u043e\u0434\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u2014 \u0440\u0430\u043d\u0442\u0430\u0439\u043c, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>bash<\/p>\n<pre><code>curl -fsSL https:\/\/ollama.com\/install.sh | sh   # Linuxollama pull llama3.1:8bollama run llama3.1:8b<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>2. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c API \u0432 \u0441\u0435\u0442\u0438<\/h3>\n<p>Ollama \u0434\u0435\u0440\u0436\u0438\u0442 REST \u043d\u0430 <code>127.0.0.1:11434<\/code>. \u0427\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0448\u0430\u043b \u0432\u0441\u044e \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043c unit:<\/p>\n<p>bash<\/p>\n<pre><code>sudo systemctl edit ollama<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<p>ini<\/p>\n<pre><code>[Service]Environment=\"OLLAMA_HOST=0.0.0.0:11434\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p>bash<\/p>\n<pre><code>sudo systemctl restart ollama<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>3. \u0414\u043e\u0441\u0442\u0443\u043f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 \u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/h3>\n<p>\u041f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u2014 \u0431\u043e\u043b\u044c \u0438 \u0434\u044b\u0440\u0430. \u041f\u0440\u043e\u0449\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u044c: \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0430\u043c \u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0436\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b <a href=\"http:\/\/nozi.io\" rel=\"noopener nofollow\"><strong>nozi.io<\/strong><\/a> \u2014 \u043e\u0434\u0438\u043d \u0430\u0434\u0440\u0435\u0441 \u0438 \u0438\u0437 \u0434\u043e\u043c\u0430, \u0438 \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 NAT \u0438 \u0441\u0435\u0440\u043e\u0433\u043e IP.<\/p>\n<p>\u26a0\ufe0f <strong>\u0420\u0430\u0437 API \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u2014 \u0437\u0430\u043a\u0440\u043e\u0439\u0442\u0435 \u0435\u0433\u043e.<\/strong> \u041c\u0438\u043d\u0438\u043c\u0443\u043c: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435. \u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043a\u0430\u043d\u0435\u0440\u044b \u043d\u0430\u0439\u0434\u0443\u0442 \u0437\u0430 \u0447\u0430\u0441\u044b \u0438 \u043d\u0430\u0447\u043d\u0443\u0442 \u0433\u0440\u0435\u0442\u044c \u0432\u0430\u0448\u0443 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443.<\/p>\n<h3>4. \u0427\u0442\u043e\u0431\u044b \u0436\u0438\u043b\u043e \u0441\u0430\u043c\u043e<\/h3>\n<p>\u041a\u043e\u043c\u043f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0435\u0442 \u2014 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043f\u0430\u0434\u0430\u0435\u0442. \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 systemd, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0441\u0430\u043c.<\/p>\n<p>\u042e\u043d\u0438\u0442 <code>\/etc\/systemd\/system\/nozi-tunnel.service<\/code>:<\/p>\n<p>ini<\/p>\n<pre><code>[Unit]Description=Keep Ollama tunnel aliveAfter=network-online.target ollama.serviceWants=network-online.target[Service]ExecStart=\/home\/user\/keep-tunnel.shRestart=alwaysRestartSec=5User=user[Install]WantedBy=multi-user.target<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <a href=\"http:\/\/keep-tunnel.sh\" rel=\"noopener nofollow\"><code>keep-tunnel.sh<\/code><\/a> \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432 \u0446\u0438\u043a\u043b\u0435:<\/p>\n<p>bash<\/p>\n<pre><code>#!\/usr\/bin\/env bashset -uwhile true; do    nozi tunnel --port 11434   # \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0430    echo \"\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0443\u043f\u0430\u043b, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 5\u0441\"    sleep 5done<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c:<\/p>\n<p>bash<\/p>\n<pre><code>sudo systemctl daemon-reloadsudo systemctl enable --now nozi-tunnel.service<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0436\u0435\u043b\u0435\u0437\u0435: \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043c\u0430, \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u0438 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 (\u043f\u043b\u0430\u0447\u0443 \u0437\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u043e), \u043e\u0434\u0438\u043d \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043e\u0432\u0441\u044e\u0434\u0443, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0422\u043e\u043f\u043e\u0432\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0433\u0438\u0433\u0430\u043d\u0442\u044b \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442, \u043d\u043e \u0434\u043b\u044f 90% \u0437\u0430\u0434\u0430\u0447 \u2014 \u043a\u043e\u0434, \u0442\u0435\u043a\u0441\u0442\u044b, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u2014 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441 \u0433\u043e\u043b\u043e\u0432\u043e\u0439.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 Ollama \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"http:\/\/nozi.io\" rel=\"noopener nofollow\">nozi.io<\/a> \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e. \u0421\u0435\u0440\u044c\u0451\u0437\u043d\u043e.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p>Ollama \u2014 <a href=\"https:\/\/ollama.com\" rel=\"noopener nofollow\">https:\/\/ollama.com<\/a><\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 <a href=\"https:\/\/ollama.com\/library\" rel=\"noopener nofollow\">https:\/\/ollama.com\/library<\/a><\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c (nozi) \u2014 <a href=\"https:\/\/nozi.io\" rel=\"noopener nofollow\">https:\/\/nozi.io<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1086862\/\">https:\/\/habr.com\/ru\/articles\/1086862\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430\u0434\u043e\u0435\u043b\u0438 \u043b\u0438\u043c\u0438\u0442\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0440\u043e\u0436\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0414\u043e\u043c\u0430 \u0441\u0442\u043e\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0439? \u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0439 LLM-\u0441\u0435\u0440\u0432\u0435\u0440.\u0416\u0435\u043b\u0435\u0437\u043eCPU 8 \u044f\u0434\u0435\u0440, 32 \u0413\u0411 RAM \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0436\u0438\u0432\u0451\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.GPU \u043d\u0430 12 \u0413\u0411 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u0435\u043d: \u0441 \u043d\u0438\u043c 7\u20138B \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0435\u0442\u0430\u044e\u0442. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 CPU, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.1. \u0421\u0442\u0430\u0432\u0438\u043c Ollama\u00abDocker \u0434\u043b\u044f LLM\u00bb: \u043e\u0434\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u2014 \u0440\u0430\u043d\u0442\u0430\u0439\u043c, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043c\u043e\u0434\u0435\u043b\u044c.bashcurl -fsSL https:\/\/ollama.com\/install.sh | sh   # Linuxollama pull llama3.1:8bollama run llama3.1:8b2. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c API \u0432 \u0441\u0435\u0442\u0438Ollama \u0434\u0435\u0440\u0436\u0438\u0442 REST \u043d\u0430 127.0.0.1:11434. \u0427\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0448\u0430\u043b \u0432\u0441\u044e \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043c unit:bashsudo systemctl edit ollama\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:ini[Service]Environment=&#187;OLLAMA_HOST=0.0.0.0:11434&#8243;\u0418 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:bashsudo systemctl restart ollama3. \u0414\u043e\u0441\u0442\u0443\u043f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u041f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u2014 \u0431\u043e\u043b\u044c \u0438 \u0434\u044b\u0440\u0430. \u041f\u0440\u043e\u0449\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u044c: \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0430\u043c \u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0436\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b nozi.io \u2014 \u043e\u0434\u0438\u043d \u0430\u0434\u0440\u0435\u0441 \u0438 \u0438\u0437 \u0434\u043e\u043c\u0430, \u0438 \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 NAT \u0438 \u0441\u0435\u0440\u043e\u0433\u043e IP.\u26a0\ufe0f \u0420\u0430\u0437 API \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u2014 \u0437\u0430\u043a\u0440\u043e\u0439\u0442\u0435 \u0435\u0433\u043e. \u041c\u0438\u043d\u0438\u043c\u0443\u043c: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435. \u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043a\u0430\u043d\u0435\u0440\u044b \u043d\u0430\u0439\u0434\u0443\u0442 \u0437\u0430 \u0447\u0430\u0441\u044b \u0438 \u043d\u0430\u0447\u043d\u0443\u0442 \u0433\u0440\u0435\u0442\u044c \u0432\u0430\u0448\u0443 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443.4. \u0427\u0442\u043e\u0431\u044b \u0436\u0438\u043b\u043e \u0441\u0430\u043c\u043e\u041a\u043e\u043c\u043f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0435\u0442 \u2014 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043f\u0430\u0434\u0430\u0435\u0442. \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 systemd, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0441\u0430\u043c.\u042e\u043d\u0438\u0442 \/etc\/systemd\/system\/nozi-tunnel.service:ini[Unit]Description=Keep Ollama tunnel aliveAfter=network-online.target ollama.serviceWants=network-online.target[Service]ExecStart=\/home\/user\/keep-tunnel.shRestart=alwaysRestartSec=5User=user[Install]WantedBy=multi-user.target\u0421\u043a\u0440\u0438\u043f\u0442 keep-tunnel.sh \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432 \u0446\u0438\u043a\u043b\u0435:bash#!\/usr\/bin\/env bashset -uwhile true; do    nozi tunnel &#8212;port 11434   # \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0430    echo &#171;\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0443\u043f\u0430\u043b, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 5\u0441&#187;    sleep 5done\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c:bashsudo systemctl daemon-reloadsudo systemctl enable &#8212;now nozi-tunnel.service\u0418\u0442\u043e\u0433\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0436\u0435\u043b\u0435\u0437\u0435: \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043c\u0430, \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u0438 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 (\u043f\u043b\u0430\u0447\u0443 \u0437\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u043e), \u043e\u0434\u0438\u043d \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043e\u0432\u0441\u044e\u0434\u0443, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0422\u043e\u043f\u043e\u0432\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0433\u0438\u0433\u0430\u043d\u0442\u044b \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442, \u043d\u043e \u0434\u043b\u044f 90% \u0437\u0430\u0434\u0430\u0447 \u2014 \u043a\u043e\u0434, \u0442\u0435\u043a\u0441\u0442\u044b, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u2014 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441 \u0433\u043e\u043b\u043e\u0432\u043e\u0439.\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 Ollama \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 nozi.io \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e. \u0421\u0435\u0440\u044c\u0451\u0437\u043d\u043e.\u0421\u0441\u044b\u043b\u043a\u0438Ollama \u2014 https:\/\/ollama.com\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 https:\/\/ollama.com\/library\u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c (nozi) \u2014 https:\/\/nozi.io\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1086862\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-496145","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=496145"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496145\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=496145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=496145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=496145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}