-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa87415
commit 3e9f9ca
Showing
4 changed files
with
64 additions
and
12 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 |
---|---|---|
|
@@ -867,8 +867,8 @@ spec: | |
preferredDuringSchedulingIgnoredDuringExecution: [] | ||
persistentSpec: | ||
enabled: true | ||
storageClassName: local-volume | ||
volumeSize: 4500Gi | ||
storageClassName: hostpath-csi | ||
volumeSize: 20Gi | ||
createServiceAccount: true | ||
username: [email protected] | ||
clusterCredentialSecretRole: '' | ||
|
@@ -907,7 +907,7 @@ oc get route -n llm-demo | |
|
||
oc get secret rec -n llm-demo -o jsonpath="{.data}" | jq 'map_values(@base64d)' | ||
# { | ||
# "password": "PP1BuaXT", | ||
# "password": "gv7AZB8P", | ||
# "username": "[email protected]" | ||
# } | ||
|
||
|
@@ -955,6 +955,14 @@ oc create --save-config -n llm-demo -f ${BASE_DIR}/data/install/redis-db.yaml | |
|
||
# oc delete -n llm-demo -f ${BASE_DIR}/data/install/redis-db.yaml | ||
|
||
oc get RedisEnterpriseDatabase/my-doc -n llm-demo -o json | jq .status.internalEndpoints | ||
# [ | ||
# { | ||
# "host": "redis-13858.rec.llm-demo.svc.cluster.local", | ||
# "port": 13858 | ||
# } | ||
# ] | ||
|
||
oc get secret -n llm-demo redb-my-doc -o jsonpath="{.data}" | jq 'map_values(@base64d)' | ||
# { | ||
# "password": "ABmKLkR0", | ||
|
@@ -963,13 +971,14 @@ oc get secret -n llm-demo redb-my-doc -o jsonpath="{.data}" | jq 'map_values(@ba | |
# "service_names": "my-doc, my-doc-headless" | ||
# } | ||
|
||
# VAR_HOST=`oc get RedisEnterpriseDatabase/my-doc -n llm-demo -o json | jq .status.internalEndpoints[0].host -r` | ||
VAR_PWD=`oc get secret -n llm-demo redb-my-doc -o jsonpath="{.data}" | jq 'map_values(@base64d)' | jq -r .password` | ||
VAR_PORT=`oc get secret -n llm-demo redb-my-doc -o jsonpath="{.data}" | jq 'map_values(@base64d)' | jq -r .port` | ||
|
||
VAR_REDIS="redis://default:${VAR_PWD}@my-doc-headless.llm-demo.svc.cluster.local:${VAR_PORT}" | ||
|
||
echo $VAR_REDIS | ||
# redis://default:ABmKLkR0@my-doc-headless.llm-demo.svc.cluster.local:13858 | ||
# redis://default:Ygg8FgJc@my-doc-headless.llm-demo.svc.cluster.local:16432 | ||
|
||
|
||
``` | ||
|
@@ -1002,28 +1011,71 @@ gradio-hftgi-rag-redis | |
|
||
- https://github.com/rh-aiservices-bu/llm-on-openshift/blob/main/examples/ui/gradio/gradio-hftgi-rag-redis/README.md | ||
|
||
```bash | ||
# https://github.com/wangzheng422/llm-on-openshift/tree/wzh/examples/ui/gradio/gradio-hftgi-rag-redis/deployment/wzh | ||
|
||
oc create -n llm-demo -f ${BASE_DIR}/wzh/ | ||
### create index | ||
|
||
# oc delete -n llm-demo -f ${BASE_DIR}/wzh/ | ||
Langchain-Redis-Ingest.ipynb | ||
|
||
![](imgs/2023-11-08-23-43-00.png) | ||
|
||
``` | ||
![](imgs/2023-11-08-23-44-59.png) | ||
|
||
open this notebook | ||
- https://github.com/rh-aiservices-bu/llm-on-openshift/blob/main/examples/notebooks/langchain/Langchain-Redis-Ingest.ipynb | ||
|
||
### Langchain-Redis-Ingest.ipynb | ||
run it step by step, or all | ||
|
||
![](imgs/2023-11-08-23-43-00.png) | ||
![](imgs/2023-11-15-00-05-56.png) | ||
|
||
![](imgs/2023-11-08-23-44-59.png) | ||
### deploy | ||
|
||
```bash | ||
|
||
# we need to build image for module cache | ||
# on vultr | ||
systemctl enable --now docker.service | ||
|
||
mkdir -p /data/llm-build | ||
cd /data/llm-build | ||
|
||
cat << EOF > /data/llm-build/build.dockerfile | ||
FROM quay.io/rh-aiservices-bu/gradio-hftgi-rag-redis:latest | ||
RUN python app.py || true | ||
EOF | ||
|
||
docker build -t quay.io/wangzheng422/qimgs:2023-11-14-gradio-hftgi-rag-redis-01 -f build.dockerfile . | ||
|
||
docker push quay.io/wangzheng422/qimgs:2023-11-14-gradio-hftgi-rag-redis-01 | ||
|
||
|
||
# docker run -it -d \ | ||
# --name llm-build \ | ||
# --gpus all \ | ||
# --shm-size 1g \ | ||
# quay.io/rh-aiservices-bu/gradio-hftgi-rag-redis:latest | ||
|
||
# docker export llm-build | docker import - quay.io/wangzheng422/qimgs:2023-11-14-gradio-hftgi-rag-redis | ||
|
||
# docker push quay.io/wangzheng422/qimgs:2023-11-14-gradio-hftgi-rag-redis | ||
|
||
# go back to helper node | ||
# https://github.com/wangzheng422/llm-on-openshift/tree/wzh/examples/ui/gradio/gradio-hftgi-rag-redis/deployment/wzh | ||
|
||
oc create -n llm-demo -f ${BASE_DIR}/wzh/ | ||
|
||
# oc delete -n llm-demo -f ${BASE_DIR}/wzh/ | ||
|
||
``` | ||
|
||
then, you can see the webpage: | ||
|
||
![](imgs/2023-11-15-00-07-26.png) | ||
|
||
![](imgs/2023-11-15-00-07-42.png) | ||
|
||
|
||
# end | ||
|
||
![](imgs/2023-11-09-14-39-44.png) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.