-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
- Loading branch information
1 parent
23d2340
commit 84da3a3
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Deploy Ollama to Kubernetes Operator | ||
|
||
|
||
### Prerequisites | ||
|
||
- Install [Ollama-operator](https://github.com/nekomeowww/ollama-operator) | ||
|
||
### Steps | ||
|
||
1. create a `Model` CR, serving model `phi` as an example: | ||
|
||
``` | ||
kubectl apply -f - << EOF | ||
apiVersion: ollama.ayaka.io/v1 | ||
kind: Model | ||
metadata: | ||
name: phi | ||
spec: | ||
image: phi | ||
EOF | ||
``` | ||
|
||
2. forward the ports to access the model outside cluster: | ||
``` | ||
kubectl port-forward svc/ollama-model-phi ollama | ||
``` | ||
|
||
3. Install [ollama cli](https://github.com/ollama/ollama) and interact with the model with either API or ollama CLI( e.g. `ollama run phi` ). |