2023-06-28 01:46:46 +08:00
|
|
|
# Development
|
|
|
|
|
2023-08-31 04:35:03 +08:00
|
|
|
- Install cmake or (optionally, required tools for GPUs)
|
|
|
|
- run `go generate ./...`
|
|
|
|
- run `go build .`
|
|
|
|
|
2023-07-08 00:59:24 +08:00
|
|
|
Install required tools:
|
2023-06-28 01:46:46 +08:00
|
|
|
|
2023-09-12 23:04:35 +08:00
|
|
|
- cmake version 3.24 or higher
|
|
|
|
- go version 1.20 or higher
|
|
|
|
- gcc version 11.4.0 or higher
|
|
|
|
|
2023-06-28 01:46:46 +08:00
|
|
|
```
|
2023-08-31 04:35:03 +08:00
|
|
|
brew install go cmake gcc
|
2023-06-28 01:46:46 +08:00
|
|
|
```
|
|
|
|
|
2023-08-31 04:35:03 +08:00
|
|
|
Get the required libraries:
|
2023-07-22 04:36:36 +08:00
|
|
|
|
|
|
|
```
|
2023-08-31 04:35:03 +08:00
|
|
|
go generate ./...
|
2023-07-22 04:36:36 +08:00
|
|
|
```
|
|
|
|
|
2023-07-18 08:16:59 +08:00
|
|
|
Then build ollama:
|
2023-06-28 01:46:46 +08:00
|
|
|
|
|
|
|
```
|
2023-07-18 08:16:59 +08:00
|
|
|
go build .
|
2023-06-28 01:46:46 +08:00
|
|
|
```
|
|
|
|
|
2023-07-08 00:59:24 +08:00
|
|
|
Now you can run `ollama`:
|
2023-06-28 01:46:46 +08:00
|
|
|
|
|
|
|
```
|
2023-07-08 00:59:24 +08:00
|
|
|
./ollama
|
2023-06-28 01:46:46 +08:00
|
|
|
```
|
2023-09-12 23:04:35 +08:00
|
|
|
|
|
|
|
## Building on Linux with GPU support
|
|
|
|
|
|
|
|
- Install cmake and nvidia-cuda-toolkit
|
2023-09-21 03:36:14 +08:00
|
|
|
- run `CUBLAS_PATH=/path/to/libcublas.so CUDART_PATH=/path/to/libcudart.so CUBLASLT_PATH=/path/to/libcublasLt.so go generate ./...`
|
2023-09-12 23:04:35 +08:00
|
|
|
- run `go build .`
|