development.md 790 Bytes
Newer Older
Bruce MacDonald's avatar
Bruce MacDonald committed
1
2
# Development

Jeffrey Morgan's avatar
Jeffrey Morgan committed
3
Install required tools:
Bruce MacDonald's avatar
Bruce MacDonald committed
4
5

```
Matt Williams's avatar
Matt Williams committed
6
brew install go
Bruce MacDonald's avatar
Bruce MacDonald committed
7
8
```

9
10
11
12
13
14
Enable CGO:

```
export CGO_ENABLED=1
```

Michael Yang's avatar
Michael Yang committed
15
16
You will also need a C/C++ compiler such as GCC for MacOS and Linux or Mingw-w64 GCC for Windows.

Matt Williams's avatar
Matt Williams committed
17
Then build ollama:
Bruce MacDonald's avatar
Bruce MacDonald committed
18
19

```
Matt Williams's avatar
Matt Williams committed
20
go build .
Bruce MacDonald's avatar
Bruce MacDonald committed
21
22
```

Jeffrey Morgan's avatar
Jeffrey Morgan committed
23
Now you can run `ollama`:
Bruce MacDonald's avatar
Bruce MacDonald committed
24
25

```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
26
./ollama
Bruce MacDonald's avatar
Bruce MacDonald committed
27
28
```

Jeffrey Morgan's avatar
Jeffrey Morgan committed
29
## Releasing
Bruce MacDonald's avatar
Bruce MacDonald committed
30

Jeffrey Morgan's avatar
Jeffrey Morgan committed
31
To release a new version of Ollama you'll need to set some environment variables:
Bruce MacDonald's avatar
Bruce MacDonald committed
32

Jeffrey Morgan's avatar
Jeffrey Morgan committed
33
34
35
36
37
38
39
40
* `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:
Bruce MacDonald's avatar
Bruce MacDonald committed
41
42

```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
43
VERSION=0.0.2 ./scripts/publish.sh
Bruce MacDonald's avatar
Bruce MacDonald committed
44
```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
45
46
47
48