更新 通过Ollama部署本地大模型
parent
3bed684e51
commit
e0e2d210da
@ -53,8 +53,37 @@ systemctl enable ollama
|
||||
|
||||
# 二、MacOS和Windows配置外部访问(使局域网其他设备可以通过API连接大模型)
|
||||
## 2.1 MacOS15.3
|
||||
```
|
||||
|
||||
- 安装好ollama后编辑配置文件,没有就新建一个
|
||||
`nano /Users/xxxusername//Library/LaunchAgents/com.ollama.plist`
|
||||
```
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.ollama</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/ollama</string>
|
||||
<string>serve</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/tmp/ollama.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/tmp/ollama.error.log</string>
|
||||
#以下5行是配置OLLAMA_HOST的环境变量
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>OLLAMA_HOST</key>
|
||||
<string>0.0.0.0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
||||
## 2.2 Windows11
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user