Skip to content

Commit 3eac460

Browse files
committed
docs: update using "starter" distro than "ollama"
- update example and create one without using userconfigmap - set new env to enable ollama - use the same llama model as in llama-stack - remove deprecated distro images from distribution.json Signed-off-by: Wen Zhou <[email protected]>
1 parent add32af commit 3eac460

File tree

6 files changed

+52
-24
lines changed

6 files changed

+52
-24
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,22 @@ spec:
8080
replicas: 1
8181
server:
8282
distribution:
83-
name: ollama
83+
name: starter
8484
containerSpec:
85-
port: 8321
8685
env:
8786
- name: INFERENCE_MODEL
88-
value: "llama3.2:1b"
87+
value: "llama3.2:3b"
8988
- name: OLLAMA_URL
9089
value: "http://ollama-server-service.ollama-dist.svc.cluster.local:11434"
90+
- name: ENABLE_OLLAMA
91+
value: ollama
9192
storage:
9293
size: "20Gi"
9394
mountPath: "/home/lls/.lls"
9495
```
9596
3. Verify the server pod is running in the user defined namespace.
9697

97-
### Using a ConfigMap for run.yaml configuration
98+
### Using a ConfigMap to override default run.yaml configuration from distribution
9899

99100
A ConfigMap can be used to store run.yaml configuration for each LlamaStackDistribution.
100101
Updates to the ConfigMap will restart the Pod to load the new data.

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
allowPrivilegeEscalation: false
4949
capabilities:
5050
drop:
51-
- "ALL"
51+
- "ALL"
5252
livenessProbe:
5353
httpGet:
5454
path: /healthz

config/samples/_v1alpha1_llamastackdistribution.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ spec:
88
containerSpec:
99
env:
1010
- name: INFERENCE_MODEL
11-
value: 'llama3.2:1b'
11+
value: 'llama3.2:3b'
1212
- name: OLLAMA_URL
1313
value: 'http://ollama-server-service.ollama-dist.svc.cluster.local:11434'
14+
- name: ENABLE_OLLAMA
15+
value: ollama
1416
name: llama-stack
1517
distribution:
16-
name: ollama
18+
name: starter
1719
# Uncomment the storage section to use persistent storage
1820
# storage: {} # Will use default size of 10Gi and default mount path of /.llama
1921
# Or specify custom values:

config/samples/example-with-configmap.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,44 @@ data:
66
run.yaml: |
77
# Llama Stack Configuration
88
version: '2'
9-
image_name: ollama
9+
image_name: starter
1010
apis:
1111
- inference
1212
providers:
1313
inference:
14-
- provider_id: ollama
14+
- provider_id: ${env.ENABLE_OLLAMA:=__disabled__}
1515
provider_type: "remote::ollama"
1616
config:
1717
url: "http://ollama-server-service.ollama-dist.svc.cluster.local:11434"
1818
models:
19-
- model_id: "llama3.2:1b"
19+
- model_id: "ollama/llama3.2:3b"
2020
provider_id: ollama
2121
model_type: llm
22+
provider_model_id: llama3.2:3b
23+
- embedding_dimension: 384
24+
model_id: ${env.ENABLE_OLLAMA:=__disabled__}/${env.OLLAMA_EMBEDDING_MODEL:=__disabled__}
25+
provider_id: ${env.ENABLE_OLLAMA:=__disabled__}
26+
provider_model_id: ${env.OLLAMA_EMBEDDING_MODEL:=__disabled__}
27+
model_type: embedding
2228
server:
2329
port: 8321
2430
---
2531
apiVersion: llamastack.io/v1alpha1
2632
kind: LlamaStackDistribution
2733
metadata:
28-
name: llamastack-with-config
34+
name: llamastack-with-userconfig
2935
spec:
3036
replicas: 1
3137
server:
3238
distribution:
33-
name: ollama
39+
name: starter
3440
containerSpec:
3541
port: 8321
3642
env:
37-
- name: INFERENCE_MODEL
38-
value: "llama3.2:1b"
39-
- name: OLLAMA_URL
40-
value: "http://ollama-server-service.ollama-dist.svc.cluster.local:11434"
43+
- name: ENABLE_OLLAMA
44+
value: ollama
45+
- name: OLLAMA_EMBEDDING_MODEL
46+
value: all-minilm:l6-v2
4147
userConfig:
42-
configMapName: llama-stack-config
48+
configMapName: llama-stack-config # use ConfigMap's data.run.yaml
4349
# configMapNamespace: "" # Optional - defaults to the same namespace as the CR
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: llamastack.io/v1alpha1
3+
kind: LlamaStackDistribution
4+
metadata:
5+
name: llamastack-without-userconfig
6+
spec:
7+
replicas: 1
8+
server:
9+
distribution:
10+
name: starter
11+
containerSpec:
12+
port: 8321
13+
env:
14+
- name: OLLAMA_INFERENCE_MODEL
15+
value: "llama3.2:3b"
16+
- name: OLLAMA_URL
17+
value: "http://ollama-server-service.ollama-dist.svc.cluster.local:11434"
18+
- name: ENABLE_OLLAMA
19+
value: ollama
20+
storage:
21+
size: "10Gi" # Optional - defaults to 10Gi
22+
mountPath: "/home/lls/.lls" # Optional - defaults to /.llama

distributions.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
"starter": "docker.io/llamastack/distribution-starter:latest",
3-
"ollama": "docker.io/llamastack/distribution-ollama:latest",
4-
"bedrock": "docker.io/llamastack/distribution-bedrock:latest",
5-
"remote-vllm": "docker.io/llamastack/distribution-remote-vllm:latest",
6-
"tgi": "docker.io/llamastack/distribution-tgi:latest",
7-
"together": "docker.io/llamastack/distribution-together:latest",
8-
"vllm-gpu": "docker.io/llamastack/distribution-vllm-gpu:latest"
2+
"starter": "docker.io/llamastack/distribution-starter:0.2.15",
3+
"remote-vllm": "docker.io/llamastack/distribution-remote-vllm:0.2.15",
4+
"meta-reference-gpu": "docker.io/llamastack/distribution-meta-reference-gpu:0.2.15",
5+
"postgres-demo": "docker.io/llamastack/distribution-postgres-demo:0.2.15"
96
}

0 commit comments

Comments
 (0)