ollama/docs/development.md

69 lines
798 B
Markdown
Raw Normal View History

2023-06-27 17:46:46 +00:00
# Development
## 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:
```
pip install -r requirements.txt
```
2023-06-27 18:50:23 +00:00
Run a server:
2023-06-27 17:46:46 +00:00
```
python3 ollama.py serve
```
2023-06-27 18:06:49 +00:00
**Start frontend service:**
Install dependencies:
2023-06-27 18:50:23 +00:00
2023-06-27 18:06:49 +00:00
```
2023-06-27 18:07:31 +00:00
cd desktop
2023-06-27 18:06:49 +00:00
npm install
```
2023-06-27 18:50:23 +00:00
Run the UI:
2023-06-27 18:06:49 +00:00
```
npm start
```
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
pip install -r requirements.txt
```
Then build a binary for your current platform:
```bash
python3 build.py
```
### Building the app
```
cd desktop
npm run package
```
2023-06-27 18:50:23 +00:00
## Update requirements.txt
In the root directory, run:
```
pipreqs . --force
```