{"id":469540,"date":"2025-08-04T15:01:41","date_gmt":"2025-08-04T15:01:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=469540"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=469540","title":{"rendered":"<span>\u041a\u0430\u043a \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u0440\u043d\u0443\u044e LLM \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043c<\/h3>\n<p><strong>Ollama<\/strong> \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 LLM (\u043a\u0430\u043a LLaMA, Mistral, Gemma \u0438 \u0434\u0440\u0443\u0433\u0438\u0435)<br \/> <strong>LLaMA<\/strong> (Large Language Model Meta AI) \u2014 \u044d\u0442\u043e \u0441\u0435\u0440\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Meta<br \/> <strong>OpenWebUI<\/strong> \u2014 \u044d\u0442\u043e \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f Ollama, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 ChatGPT, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438<\/p>\n<h3>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c<\/h3>\n<p>Memory 8+ GB<br \/> CPU 4+ (\u043b\u0443\u0447\u0448\u0435 GPU)<br \/> HDD 25+ GB<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker Engine<\/h3>\n<p><a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.docker.com\/engine\/install\/ubuntu<\/a><\/p>\n<pre><code># Add Docker's official GPG key: sudo apt-get update sudo apt-get install -y ca-certificates curl sudo install -m 0755 -d \/etc\/apt\/keyrings sudo curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/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\/ubuntu \\   $(. \/etc\/os-release &amp;&amp; echo \"$VERSION_CODENAME\") stable\" | \\   sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null sudo apt-get update # Install Docker sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin <\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 LLM<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>entrypoint.sh<\/code> \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0438\u043c\u0443\u044e  \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e LLM \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<pre><code>#!\/bin\/bash  \/bin\/ollama serve &amp; pid=$! sleep 5 ollama pull llama3 wait $pid <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b Docker Compose \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 <code>docker-compose.yaml<\/code><\/p>\n<pre><code>--- version: '3.8' services:   ollama:     image: ollama\/ollama     ports:       - \"11434:11434\"     volumes:       - .\/ollama:\/root\/.ollama       - .\/entrypoint.sh:\/entrypoint.sh     environment:       - OLLAMA_DEVICE=cpu     restart: always     tty: true     pull_policy: always     container_name: ollama     entrypoint: [\"\/usr\/bin\/bash\", \"\/entrypoint.sh\"]    openwebui:     image: ghcr.io\/open-webui\/open-webui:main     ports:       - \"80:8080\"     environment:       - OLLAMA_BASE_URL=http:\/\/ollama:11434     depends_on:       - ollama     restart: always     container_name: openwebui ... <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c<\/p>\n<pre><code>docker compose up -d <\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e! Web UI \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e http:\/\/&lt;host_IP&gt;<\/p>\n<h3>\u0411\u043e\u043d\u0443\u0441\u043e\u043c: \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e API \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<pre><code>from langchain_ollama import ChatOllama  llm = ChatOllama(     model=\"llama3:latest\",     base_url=\"http:\/\/&lt;VM_IP&gt;:11434\", )  response = llm.invoke([(\"human\", \"What is LLM?\")])  print(response.content) <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/933908\/\"> https:\/\/habr.com\/ru\/articles\/933908\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043c<\/h3>\n<p><strong>Ollama<\/strong> \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 LLM (\u043a\u0430\u043a LLaMA, Mistral, Gemma \u0438 \u0434\u0440\u0443\u0433\u0438\u0435)<br \/> <strong>LLaMA<\/strong> (Large Language Model Meta AI) \u2014 \u044d\u0442\u043e \u0441\u0435\u0440\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Meta<br \/> <strong>OpenWebUI<\/strong> \u2014 \u044d\u0442\u043e \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f Ollama, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 ChatGPT, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438<\/p>\n<h3>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c<\/h3>\n<p>Memory 8+ GB<br \/> CPU 4+ (\u043b\u0443\u0447\u0448\u0435 GPU)<br \/> HDD 25+ GB<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker Engine<\/h3>\n<p><a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.docker.com\/engine\/install\/ubuntu<\/a><\/p>\n<pre><code># Add Docker's official GPG key: sudo apt-get update sudo apt-get install -y ca-certificates curl sudo install -m 0755 -d \/etc\/apt\/keyrings sudo curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/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\/ubuntu \\   $(. \/etc\/os-release &amp;&amp; echo \"$VERSION_CODENAME\") stable\" | \\   sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null sudo apt-get update # Install Docker sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin <\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 LLM<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>entrypoint.sh<\/code> \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0438\u043c\u0443\u044e  \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e LLM \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<pre><code>#!\/bin\/bash  \/bin\/ollama serve &amp; pid=$! sleep 5 ollama pull llama3 wait $pid <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b Docker Compose \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 <code>docker-compose.yaml<\/code><\/p>\n<pre><code>--- version: '3.8' services:   ollama:     image: ollama\/ollama     ports:       - \"11434:11434\"     volumes:       - .\/ollama:\/root\/.ollama       - .\/entrypoint.sh:\/entrypoint.sh     environment:       - OLLAMA_DEVICE=cpu     restart: always     tty: true     pull_policy: always     container_name: ollama     entrypoint: [\"\/usr\/bin\/bash\", \"\/entrypoint.sh\"]    openwebui:     image: ghcr.io\/open-webui\/open-webui:main     ports:       - \"80:8080\"     environment:       - OLLAMA_BASE_URL=http:\/\/ollama:11434     depends_on:       - ollama     restart: always     container_name: openwebui ... <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c<\/p>\n<pre><code>docker compose up -d <\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e! Web UI \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e http:\/\/&lt;host_IP&gt;<\/p>\n<h3>\u0411\u043e\u043d\u0443\u0441\u043e\u043c: \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e API \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<pre><code>from langchain_ollama import ChatOllama  llm = ChatOllama(     model=\"llama3:latest\",     base_url=\"http:\/\/&lt;VM_IP&gt;:11434\", )  response = llm.invoke([(\"human\", \"What is LLM?\")])  print(response.content) <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/933908\/\"> https:\/\/habr.com\/ru\/articles\/933908\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-469540","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469540","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=469540"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469540\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=469540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=469540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}