ollama/docs/development.md

49 lines
687 B
Markdown
Raw Normal View History

2023-06-27 17:46:46 +00:00
# Development
2023-06-28 15:16:57 +00:00
ollama is built and run using [Poetry](https://python-poetry.org/).
2023-06-27 17:46:46 +00:00
## Running
2023-06-27 18:06:49 +00:00
**Start backend service:**
2023-06-27 18:06:59 +00:00
2023-06-27 17:46:46 +00:00
Install dependencies:
```
2023-06-28 15:16:57 +00:00
poetry install --extras server
2023-06-27 17:46:46 +00:00
```
2023-06-27 18:50:23 +00:00
Run a server:
2023-06-27 17:46:46 +00:00
```
2023-06-28 15:16:57 +00:00
poetry run ollama serve
2023-06-27 17:46:46 +00:00
```
## Building
If using Apple silicon, you need a Python version that supports arm64:
```bash
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
```
Get the dependencies:
```bash
2023-06-28 15:16:57 +00:00
poetry install --extras server
2023-06-27 17:46:46 +00:00
```
Then build a binary for your current platform:
```bash
2023-06-28 15:16:57 +00:00
poetry build
2023-06-27 17:46:46 +00:00
```
2023-06-27 18:50:23 +00:00
## Update requirements.txt
In the root directory, run:
```
pipreqs . --force
```