2023-06-27 13:46:46 -04:00
|
|
|
# Development
|
|
|
|
|
2023-08-30 16:35:03 -04:00
|
|
|
- Install cmake or (optionally, required tools for GPUs)
|
|
|
|
- run `go generate ./...`
|
|
|
|
- run `go build .`
|
|
|
|
|
2023-07-07 12:59:24 -04:00
|
|
|
Install required tools:
|
2023-06-27 13:46:46 -04:00
|
|
|
|
2023-09-12 11:04:35 -04:00
|
|
|
- cmake version 3.24 or higher
|
|
|
|
- go version 1.20 or higher
|
|
|
|
- gcc version 11.4.0 or higher
|
|
|
|
|
2023-10-02 02:51:01 +08:00
|
|
|
```bash
|
2023-08-30 16:35:03 -04:00
|
|
|
brew install go cmake gcc
|
2023-06-27 13:46:46 -04:00
|
|
|
```
|
|
|
|
|
2023-08-30 16:35:03 -04:00
|
|
|
Get the required libraries:
|
2023-07-21 22:36:36 +02:00
|
|
|
|
2023-10-02 02:51:01 +08:00
|
|
|
```bash
|
2023-08-30 16:35:03 -04:00
|
|
|
go generate ./...
|
2023-07-21 22:36:36 +02:00
|
|
|
```
|
|
|
|
|
2023-07-17 17:16:59 -07:00
|
|
|
Then build ollama:
|
2023-06-27 13:46:46 -04:00
|
|
|
|
2023-10-02 02:51:01 +08:00
|
|
|
```bash
|
2023-07-17 17:16:59 -07:00
|
|
|
go build .
|
2023-06-27 13:46:46 -04:00
|
|
|
```
|
|
|
|
|
2023-07-07 12:59:24 -04:00
|
|
|
Now you can run `ollama`:
|
2023-06-27 13:46:46 -04:00
|
|
|
|
2023-10-02 02:51:01 +08:00
|
|
|
```bash
|
2023-07-07 12:59:24 -04:00
|
|
|
./ollama
|
2023-06-27 13:46:46 -04:00
|
|
|
```
|
2023-09-12 11:04:35 -04:00
|
|
|
|
|
|
|
## Building on Linux with GPU support
|
|
|
|
|
|
|
|
- Install cmake and nvidia-cuda-toolkit
|
2023-09-20 12:15:23 -07:00
|
|
|
- run `go generate ./...`
|
2023-09-12 11:04:35 -04:00
|
|
|
- run `go build .`
|