# ai-ollama **Repository Path**: ing/ai-ollama ## Basic Information - **Project Name**: ai-ollama - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-03 - **Last Updated**: 2024-09-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## ollama的镜像版本安装 ### 创建ollama镜像映射到主机的目录 ```shell mkdri -p /opt/data/ollama ``` ### Docker安装指令 ```shell docker run -d -v /opt/data/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama ``` ## 验证ollama是否安装成功 ```shell http://IP:11434 ``` ## 如果是内网,需要下载模型然后拷贝到/opt/data/ollama即可 ```shell ollama地址模型访问地址:https://ollama.com/library/phi3 下载模型:ollama pull phi3 运模型行:ollama run phi3 ``` ## 安装open-webui(CPU),可参考官方或github地址 ```shell docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main ``` ## !!!注意,如果docker安装之前,最好对host-gateway进行测试 ```shell docker run --rm --add-host=host.docker.internal:host-gateway alpine /bin/sh -c "ping -c 4 host.docker.internal" 如果网络不同,则需要把host-gateway替换成本地IP ``` ## 安装成功后,可正常访问open-webui,注册进行使用 ```shell http://IP:3000 ``` ![open-webui](demo.gif) ### 参考资料 - [ollama官方安装文档]([Ollama is now available as an official Docker image · Ollama Blog](https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image)) - [open-webui官方安装文档](https://docs.openwebui.com/getting-started/)