Commit 42dd5af5 authored by xuxzh1's avatar xuxzh1 🎱
Browse files

update readme

parent b9f2af0d
...@@ -27,14 +27,7 @@ cd ollama ...@@ -27,14 +27,7 @@ cd ollama
#### 编译 #### 编译
##### 环境设置 ##### 安装go
```bash
export HSA_OVERRIDE_GFX_VERSION=设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)
export LIBRARY_PATH=/opt/dtk/llvm/lib/clang/15.0.0/lib/linux/:$LIBRARY_PATH
export HIP_VISIBLE_DEVICES=所有设备号(0,1,2,3,4,5,6,...)/选择设备号
```
安装go
```bash ```bash
wget https://go.dev/dl/go1.22.8.linux-amd64.tar.gz wget https://go.dev/dl/go1.22.8.linux-amd64.tar.gz
...@@ -42,21 +35,23 @@ tar -C /usr/local -xzf go1.22.8.linux-amd64.tar.gz ...@@ -42,21 +35,23 @@ tar -C /usr/local -xzf go1.22.8.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/usr/local/go/bin
# 修改go下载源,提升速度(按需设置) # 修改go下载源,提升速度(按需设置)
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://goproxy.cn,direct
``` ```
##### 运行编译 ##### 运行编译
```bash ```bash
make -j 16 make -j 16
export LD_LIBRARY_PATH=/path/to/ollama/llama/build/linux-amd64/runners/rocm:$LD_LIBRARY_PATH (path/to换成自己ollama路径)
go build . go build .
``` ```
## 验证 ## 运行
```bash ```bash
export HSA_OVERRIDE_GFX_VERSION=设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)
export LD_LIBRARY_PATH=/path/to/ollama/llama/build/linux-amd64/runners/rocm:$LD_LIBRARY_PATH (path/to换成到自己ollama路径)
export HIP_VISIBLE_DEVICES=所有设备号(0,1,2,3,4,5,6,...)/选择设备号
./ollama serve (选择可用设备,可通过上条命令输出结果查看) ./ollama serve (选择可用设备,可通过上条命令输出结果查看)
./ollama run llama3.1 ./ollama run llama3.1
``` ```
...@@ -68,4 +63,3 @@ go build . ...@@ -68,4 +63,3 @@ go build .
## 参考资料 ## 参考资料
* https://github.com/ollama/ollama * https://github.com/ollama/ollama
* https://github.com/ggerganov/llama.cpp
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment