Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricclyburn authored Apr 9, 2024
2 parents 855e541 + 0b3faa5 commit 7caf9a5
Show file tree
Hide file tree
Showing 80 changed files with 2,119 additions and 2,193 deletions.
3 changes: 3 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ DevOps
dex
diag
dir
diy
DIY
dotenv
drawio
ds
Expand Down Expand Up @@ -107,6 +109,7 @@ Inlining
insecureEdgeTerminationPolicy
io
ipynb
jpg
js
json
jsonpath
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/ic-rhoai-configuration/images-puller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: ic-workbench
image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/ic-workbench:1.2
image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/ic-workbench:2.0
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand Down
1 change: 0 additions & 1 deletion bootstrap/ic-rhoai-configuration/odhdashboardconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
enabled: true
notebookNamespace: rhods-notebooks
pvcSize: 5Gi
gpuSetting: '4'
notebookSizes:
- name: Standard
resources:
Expand Down
6 changes: 3 additions & 3 deletions bootstrap/ic-rhoai-configuration/workbench-imagestream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ spec:
lookupPolicy:
local: true
tags:
- name: '1.2'
- name: '2.0'
annotations:
opendatahub.io/notebook-python-dependencies: >-
[{"name":"PyTorch","version":"2.1.2"},{"name":"Langchain","version":"0.0.353"},{"name":"Ultralytics","version":"8.0.232"},]
[{"name":"PyTorch","version":"2.1.2"},{"name":"Langchain","version":"0.1.12"},{"name":"Ultralytics","version":"8.1.29"},]
opendatahub.io/notebook-software: >-
[{"name":"CUDA","version":"12.1"},{"name":"Python","version":"v3.11"}]
openshift.io/imported-from: quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-workbench
from:
kind: DockerImage
name: >-
quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-workbench:1.2
quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-workbench:2.0
importPolicy:
importMode: Legacy
referencePolicy:
Expand Down
111 changes: 0 additions & 111 deletions bootstrap/ic-shared-llm/deployment-flant5.yaml

This file was deleted.

81 changes: 81 additions & 0 deletions bootstrap/ic-shared-llm/deployment-ollama.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ollama
namespace: ic-shared-llm
spec:
replicas: 1
selector:
matchLabels:
app: ollama
strategy:
type: Recreate
template:
metadata:
labels:
app: ollama
spec:
containers:
- name: ollama
image: quay.io/rh-aiservices-bu/ollama-ubi9:0.1.30
imagePullPolicy: Always
env:
- name: MODEL_ID
value: mistral:latest
- name: OLLAMA_MODELS
value: /.ollama/models
- name: OLLAMA_HOST
value: 0.0.0.0
- name: OLLAMA_KEEP_ALIVE
value: '-1m'
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
ports:
- name: http
containerPort: 11434
protocol: TCP
resources:
limits:
cpu: '4'
memory: 8Gi
requests:
cpu: '4'
memory: 8Gi
readinessProbe:
httpGet:
path: /
port: http
scheme: HTTP
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /
port: http
scheme: HTTP
timeoutSeconds: 8
periodSeconds: 100
successThreshold: 1
failureThreshold: 3
lifecycle:
postStart:
exec:
command: [ "/bin/sh", "-c", "/bin/ollama pull $MODEL_ID" ]
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /.ollama
name: ollama-cache
restartPolicy: Always
volumes:
- name: ollama-cache
persistentVolumeClaim:
claimName: ollama-cache
25 changes: 10 additions & 15 deletions bootstrap/ic-shared-llm/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,14 @@ spec:
periodSeconds: 100
successThreshold: 1
failureThreshold: 3
env:
- name: MODEL_ID
value: mistralai/Mistral-7B-Instruct-v0.2
- name: MAX_INPUT_LENGTH
value: '4096'
- name: MAX_TOTAL_TOKENS
value: '8192'
- name: HUGGINGFACE_HUB_CACHE
value: /models-cache
- name: PORT
value: '3000'
- name: HOSTNAME
value: '0.0.0.0'
env: []
args: [
"--model",
"mistralai/Mistral-7B-Instruct-v0.2",
"--download-dir",
"/models-cache",
"--dtype", "float16",
"--max-model-len", "6144" ]
securityContext:
capabilities:
drop:
Expand All @@ -72,7 +67,7 @@ spec:
type: RuntimeDefault
ports:
- name: http
containerPort: 3000
containerPort: 8000
protocol: TCP
imagePullPolicy: IfNotPresent
startupProbe:
Expand All @@ -91,7 +86,7 @@ spec:
- name: shm
mountPath: /dev/shm
terminationMessagePolicy: File
image: 'ghcr.io/huggingface/text-generation-inference:1.3'
image: 'quay.io/rh-aiservices-bu/vllm-openai-ubi9:0.4.0'
volumes:
- name: models-cache
persistentVolumeClaim:
Expand Down
5 changes: 3 additions & 2 deletions bootstrap/ic-shared-llm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ resources:
- fix-odf-config.yaml
# wave 1
- pvc.yaml
- pvc-ollama.yaml
- deployment.yaml
- service.yaml
- deployment-flant5.yaml
- service-flant5.yaml
- deployment-ollama.yaml
- service-ollama.yaml
# wave 2
18 changes: 18 additions & 0 deletions bootstrap/ic-shared-llm/pvc-ollama.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ollama-cache
namespace: ic-shared-llm
labels:
app: ollama
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
storageClassName: ocs-storagecluster-cephfs
volumeMode: Filesystem
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
kind: Service
apiVersion: v1
metadata:
name: llm-flant5
name: ollama
namespace: ic-shared-llm
labels:
app: llm-flant5
app: ollama
spec:
clusterIP: None
ipFamilies:
- IPv4
ports:
- name: http
protocol: TCP
port: 3000
port: 11434
targetPort: http
type: ClusterIP
ipFamilyPolicy: SingleStack
sessionAffinity: None
selector:
app: llm-flant5
app: ollama
2 changes: 1 addition & 1 deletion bootstrap/ic-shared-llm/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
ports:
- name: http
protocol: TCP
port: 3000
port: 8000
targetPort: http
type: ClusterIP
ipFamilyPolicy: SingleStack
Expand Down
Loading

0 comments on commit 7caf9a5

Please sign in to comment.