2023-06-28 01:46:46 +08:00
|
|
|
# Development
|
|
|
|
|
2023-07-08 00:59:24 +08:00
|
|
|
Install required tools:
|
2023-06-28 01:46:46 +08:00
|
|
|
|
|
|
|
```
|
2023-07-18 08:16:59 +08:00
|
|
|
brew install go
|
2023-06-28 01:46:46 +08:00
|
|
|
```
|
|
|
|
|
2023-07-22 04:36:36 +08:00
|
|
|
Enable CGO:
|
|
|
|
|
|
|
|
```
|
|
|
|
export CGO_ENABLED=1
|
|
|
|
```
|
|
|
|
|
2023-07-25 00:43:53 +08:00
|
|
|
You will also need a C/C++ compiler such as GCC for MacOS and Linux or Mingw-w64 GCC for Windows.
|
|
|
|
|
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
|
|
|
```
|