-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support ollama
- Loading branch information
Showing
13 changed files
with
166 additions
and
19 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
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,36 @@ | ||
{{- if .Values.backendRuntime.install -}} | ||
apiVersion: inference.llmaz.io/v1alpha1 | ||
kind: BackendRuntime | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: backendruntime | ||
app.kubernetes.io/part-of: llmaz | ||
app.kubernetes.io/created-by: llmaz | ||
name: ollama | ||
spec: | ||
commands: | ||
- sh | ||
- -c | ||
image: ollama/ollama | ||
version: latest | ||
# Do not edit the preset argument name unless you know what you're doing. | ||
# Free to add more arguments with your requirements. | ||
args: | ||
- name: default | ||
flags: | ||
- "ollama serve & | ||
while true; do output=$(ollama list 2>&1); | ||
if ! echo $output | grep -q 'could not connect to ollama app' && echo $output | grep -q 'NAME';then echo 'ollama is running';break; else echo 'Waiting for the ollama to be running...';sleep 1;fi;done; | ||
ollama run {{`{{ .ModelName }}`}}; | ||
while true;do sleep 60;done" | ||
envs: | ||
- name: OLLAMA_HOST | ||
value: 0.0.0.0:8080 | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: 4Gi | ||
limits: | ||
cpu: 2 | ||
memory: 4Gi | ||
{{- end }} |
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
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,8 @@ | ||
apiVersion: llmaz.io/v1alpha1 | ||
kind: OpenModel | ||
metadata: | ||
name: qwen2-0--5b | ||
spec: | ||
familyName: qwen2 | ||
source: | ||
uri: OLLAMA://qwen2:0.5b |
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,10 @@ | ||
apiVersion: inference.llmaz.io/v1alpha1 | ||
kind: Playground | ||
metadata: | ||
name: qwen2-0--5b | ||
spec: | ||
replicas: 1 | ||
modelClaim: | ||
modelName: qwen2-0--5b | ||
backendRuntimeConfig: | ||
name: ollama |
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
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
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
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
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
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
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,29 @@ | ||
apiVersion: inference.llmaz.io/v1alpha1 | ||
kind: BackendRuntime | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: backendruntime | ||
app.kubernetes.io/part-of: llmaz | ||
app.kubernetes.io/created-by: llmaz | ||
name: ollama | ||
spec: | ||
commands: | ||
- sh | ||
- -c | ||
image: ollama/ollama | ||
version: latest | ||
args: | ||
- name: default | ||
flags: | ||
- "ollama serve & | ||
while true; do output=$(ollama list 2>&1); | ||
if ! echo $output | grep -q 'could not connect to ollama app' && echo $output | grep -q 'NAME';then echo 'ollama is running';break; else echo 'Waiting for the ollama to be running...';sleep 1;fi;done; | ||
ollama run {{`{{ .ModelName }}`}}; | ||
while true;do sleep 60;done" | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: 4Gi | ||
limits: | ||
cpu: 2 | ||
memory: 4Gi |
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