2023-06-27 17:46:46 +00:00
|
|
|
# Development
|
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
Install required tools:
|
2023-06-27 17:46:46 +00:00
|
|
|
|
|
|
|
```
|
2023-07-18 00:16:59 +00:00
|
|
|
brew install go
|
2023-06-27 17:46:46 +00:00
|
|
|
```
|
|
|
|
|
2023-07-21 20:36:36 +00:00
|
|
|
Enable CGO:
|
|
|
|
|
|
|
|
```
|
|
|
|
export CGO_ENABLED=1
|
|
|
|
```
|
|
|
|
|
2023-07-18 00:16:59 +00:00
|
|
|
Then build ollama:
|
2023-06-27 17:46:46 +00:00
|
|
|
|
|
|
|
```
|
2023-07-18 00:16:59 +00:00
|
|
|
go build .
|
2023-06-27 17:46:46 +00:00
|
|
|
```
|
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
Now you can run `ollama`:
|
2023-06-27 17:46:46 +00:00
|
|
|
|
|
|
|
```
|
2023-07-07 16:59:24 +00:00
|
|
|
./ollama
|
2023-06-27 17:46:46 +00:00
|
|
|
```
|
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
## Releasing
|
2023-06-27 17:46:46 +00:00
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
To release a new version of Ollama you'll need to set some environment variables:
|
2023-06-27 17:46:46 +00:00
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
* `GITHUB_TOKEN`: your GitHub token
|
|
|
|
* `APPLE_IDENTITY`: the Apple signing identity (macOS only)
|
|
|
|
* `APPLE_ID`: your Apple ID
|
|
|
|
* `APPLE_PASSWORD`: your Apple ID app-specific password
|
|
|
|
* `APPLE_TEAM_ID`: the Apple team ID for the signing identity
|
|
|
|
* `TELEMETRY_WRITE_KEY`: segment write key for telemetry
|
|
|
|
|
|
|
|
Then run the publish script with the target version:
|
2023-06-27 18:50:23 +00:00
|
|
|
|
|
|
|
```
|
2023-07-07 16:59:24 +00:00
|
|
|
VERSION=0.0.2 ./scripts/publish.sh
|
2023-06-27 18:50:23 +00:00
|
|
|
```
|
2023-07-07 16:59:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|