build.go: introduce a friendlier way to build Ollama (#3548)

This commit introduces a more friendly way to build Ollama dependencies
and the binary without abusing `go generate` and removing the
unnecessary extra steps it brings with it.

This script also provides nicer feedback to the user about what is
happening during the build process.

At the end, it prints a helpful message to the user about what to do
next (e.g. run the new local Ollama).
This commit is contained in:
Blake Mizerany
2024-04-09 14:18:47 -07:00
committed by GitHub
parent c77d45d836
commit fccf3eecaa
11 changed files with 251 additions and 61 deletions

View File

@@ -201,16 +201,10 @@ Install `cmake` and `go`:
brew install cmake go
```
Then generate dependencies:
```
go generate ./...
```
Then build the binary:
```
go build .
go run build.go
```
More detailed instructions can be found in the [developer guide](https://github.com/ollama/ollama/blob/main/docs/development.md)