- ๐ญ Iโm currently working on NLP related stuff.
- ๐ฑ Iโm currently learning things that make me happy.
STACK | PROFILE |
---|---|
Deploy langgenious/dify, an LLM based app on kubernetes with helm chart
License: MIT License
error when creating "worker-config.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: json: cannot unmarshal number into Go struct field ConfigMap.data of type string
In Linode K8s/
AttachVolume.Attach failed for volume "pvc-XXXXXXX" : rpc error: code = InvalidArgument desc = ControllerPublishVolume Volume capability is not compatible: volume_id:"2808205-XXXXXXXX" node_id:"444444" volume_capability:<mount:<fs_type:"ext4" > access_mode:<mode:MULTI_NODE_MULTI_WRITER > > volume_context:<key:"storage.kubernetes.io/csiProvisionerIdentity" value:"444444-555555-linodebs.csi.linode.com" >
dify-api setup Err
[root@VM-0-10-centos ~]# kubectl logs -f -n dify dify-api-5549c8b5d9-ggtkj
Running migrations
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
Error: 'tcp' is not a valid port number.
how to config this "tcp"
When I deploy in this way,dify-api,dipy-worker,postgresql-primary,postgresql-read,redis-master,redis-replicas,Their status is all pending๏ผError message display๏ผ0/3 nodes are available: 3 node(s) didn't find available persistent volumes to bind. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.. ๏ผAll PVC states are pending
ๆๅจ่ฟ้็ๅฐๅคงไฝฌๅจ่ฟ้ๆๅบ็ issue๏ผIDEA-CCNL/Fengshenbang-LM#295
ๆไน้ๅฐไบๅๆ ท็้ฎ้ข๏ผ1ใ็ดๆฅไฝฟ็จtorch.onnx.export()ๅฏผๅบไผๅบ็ฐไธๅ ้ถๆฃ็ๆ้๏ผ่ฟๆ ท็่ตทๆฅๆฏ่กไธ้็๏ผ
2ใไฝฟ็จhuggingface้้ข็optimum-cliๅทฅๅ
ท่ฟ่กๅฏผๅบไนไธ่ก๏ผๆ็คบไธๆฏๆmegatron-bert๏ผๅชๆฏๆ bertใdebertaใdeberta-v2่ฟๆ ทๅญ็ๆจกๅ๏ผไน่กไธ้๏ผ
ๅๆง้ฎไธไฝ่
ๅคงไฝฌๆๅๆ่งฃๅณ่ฟไธช้ฎ้ขๅ๏ผ่ฝๆๅๅฏผๅบ onnx๏ผๅฆๆๆ่งฃ็ฆ่ฏทๆ็นไธใๆไนๅ็ hfl/roberta bert็ดๆฅๅฏผๅบๆฏๆฒกๆ้ฎ้ข็๏ผไธ็ฅ้่ฟไธชๆฏmegatron-bertๆฌ่บซ็้ฎ้ข๏ผ่ฟๆฏFengshenbang่ฟไธช erlangshen-bertๆฏๆ้ฎ้ข็ใ
What are the requirements for Helm version and Kubernetes version? I attempted to deploy, but encountered an error, suspecting it might be a version issue.
error:
Error: template: dify/templates/worker-config.yaml:6:6: executing "dify/templates/worker-config.yaml" at <include "dify.worker.config" .>: error calling include: template: dify/templates/config.tpl:97:4: executing "dify.worker.config" at <include "dify.vectordb.config" .>: error calling include: template: dify/templates/config.tpl:231:40: executing "dify.vectordb.config" at <eq .clusterIP "None">: error calling eq: incompatible types for comparison
The environment name of api key in credentials.tpl
line 120 shouldn't be 'CODE_EXECUTION_API_KEY', it's API_KEY.
Error: error creating GitHub release dify-0.20.1:
POST https://api.github.com/repos/BorisPolonsky/dify-helm/releases: 422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]
mkdir: cannot create directory โ/bitnami/postgresql/dataโ: Permission denied
Because it's my first time using it, I don't quite understand. After deployment, the log shows this. Can you help me solve it
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: [unknown object type "nil" in ConfigMap.data.APP_API_URL, unknown object type "nil" in ConfigMap.data.CONSOLE_API_URL]
k8s version : 1.23
mkdir: cannot create directory โ/bitnami/postgresql/dataโ: Permission denied
Because it's my first time using it, I don't quite understand. After deployment, the log shows this. Can you help me solve it
postgresql 11:00:24.78 INFO ==> ** Starting PostgreSQL **
2024-01-04 11:00:24.800 GMT [1] LOG: pgaudit extension initialized
2024-01-04 11:00:24.805 GMT [1] LOG: starting PostgreSQL 15.3 on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2024-01-04 11:00:24.806 GMT [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-01-04 11:00:24.806 GMT [1] LOG: listening on IPv6 address "::", port 5432
2024-01-04 11:00:24.806 GMT [1] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-01-04 11:00:24.808 GMT [96] LOG: database system was interrupted; last known up at 2024-01-04 10:16:33 GMT
2024-01-04 11:00:24.817 GMT [96] LOG: database system was not properly shut down; automatic recovery in progress
2024-01-04 11:00:24.818 GMT [96] LOG: redo starts at 0/3349070
2024-01-04 11:00:24.818 GMT [96] LOG: invalid record length at 0/3349158: wanted 24, got 0
2024-01-04 11:00:24.818 GMT [96] LOG: redo done at 0/3349120 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2024-01-04 11:00:24.819 GMT [94] LOG: checkpoint starting: end-of-recovery immediate wait
2024-01-04 11:00:24.820 GMT [94] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.002 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB
2024-01-04 11:00:24.822 GMT [1] LOG: database system is ready to accept connections
2024-01-04 11:00:36.250 GMT [107] FATAL: password authentication failed for user "repl_user"
2024-01-04 11:00:36.250 GMT [107] DETAIL: Connection matched pg_hba.conf line 6: "host replication all 0.0.0.0/0 md5"
2024-01-04 11:00:41.255 GMT [108] FATAL: password authentication failed for user "repl_user"
2024-01-04 11:00:41.255 GMT [108] DETAIL: Connection matched pg_hba.conf line 6: "host replication all 0.0.0.0/0 md5"
Response em my post: http://dify.mydomain.com/v1/completion-messages
{
"code": "method_not_allowed",
"message": "The method is not allowed for the requested URL.",
"status": 405
}
Do I need to configure any variables?
CONSOLE_API_URL :
CONSOLE_WEB_URL :
Describe the bug
No example values were there for postgressql (master/ replicas) for tolerations & affinity.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Having example with values the places for tolerations & affinity.
Additional context
Please review and if this meets the standards marge it :)
Best - Shomu
Hello, please advise on the ingress paths to the respective backend services in case the proxy container is not enabled. Thanks.
Currently secrets like accessKey, secretKey etc are passed as helm values, it will be great to have option to pass their secret name and key and use in the helm chart.
This is my first time reporting a bug on github, so please forgive the poor quality.
Describe the bug
Setting the next value to true will result in an error.
externalAzureBlobStorage:
enabled: true
Because there is no condition for this.
.Values.externalAzureBlobStorage.enabled
dify-helm / charts / dify / templates/ api-deployment
volumeMounts:
{{- if not .Values.externalS3.enabled }}
- name: app-data
I believe that these conditions will resolve the error.
volumeMounts:
{{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled) }}
- name: app-data
To Reproduce
Steps to reproduce the behavior:
externalAzureBlobStorage: enabled: true
Error: UPGRADE FAILED: cannot patch "dify-api" with kind Deployment: Deployment.apps "dify-api" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "app-data" && cannot patch "dify-worker" with kind Deployment: Deployment.apps "dify-worker" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "app-data"
Desktop (please complete the following information):
I am not sure it is a good idea that api and worker share the same path.
Describe the bug
We saw there are a lot of bugs resolved in the latest version of Dify.
With new features added as of 0.6.11 https://github.com/langgenius/dify/releases/tag/0.6.11
Expected behavior
Update to 0.6.11 or the latest Dify version
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Compare vs langgenius/dify@0.6.3...0.6.11
dify-helm vaild to dify console url.
example: https://github.com/langgenius/dify/blob/main/api/config.py
self.CONSOLE_API_URL = get_env('CONSOLE_URL') if get_env('CONSOLE_URL') else get_env('CONSOLE_API_URL')
self.CONSOLE_WEB_URL = get_env('CONSOLE_URL') if get_env('CONSOLE_URL') else get_env('CONSOLE_WEB_URL')
helm value.yaml need to add those keyใ
Describe the bug
Testing the helm chart of dify so that I can use it. I did a
helm lint charts/dify
to check the charts.
To Reproduce
Steps to reproduce the behavior:
helm lint charts/dify
Expected behavior
helm lint charts/dify
==> Linting charts/dify
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: render error in "dify/templates/worker-config.yaml": template: dify/templates/worker-config.yaml:6:6: executing "dify/templates/worker-config.yaml" at <include "dify.worker.config" .>: error calling include: template: dify/templates/config.tpl:97:3: executing "dify.worker.config" at <include "dify.vectordb.config" .>: error calling include: template: dify/templates/config.tpl:240:44: executing "dify.vectordb.config" at <eq .clusterIP "None">: error calling eq: invalid type for comparison
Error: 1 chart(s) linted, 1 chart(s) failed
Desktop (please complete the following information):
Additional context
Error: template: dify/templates/worker-config.yaml:6:6: executing "dify/templates/worker-config.yaml" at <include "dify.worker.config" .>: error calling include: template: dify/templates/config.tpl:89:4: executing "dify.worker.config" at <include "dify.vectordb.config" .>: error calling include: template: dify/templates/config.tpl:223:40: executing "dify.vectordb.config" at <eq .clusterIP "None">: error calling eq: incompatible types for comparison
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
RUN:
helm repo add dify https://borispolonsky.github.io/dify-helm
helm repo update
helm install my-release dify/dify
I'm not passing any custom values.
targeting:
K3s v1.29.3+k3s1
TuringPi RK1 (arm64)
see that sandbox pod goes into crashloopbackoff.
Expected behavior
container should run normally
logs
2024/06/14 16:00:37 nodejs.go:32: [INFO]initializing nodejs runner environment... โ
โ 2024/06/14 16:00:37 nodejs.go:91: [INFO]nodejs runner environment initialized โ
โ 2024/06/14 16:00:37 setup.go:22: [INFO]initializing python runner environment... โ
โ 2024/06/14 16:00:37 setup.go:35: [INFO]python runner environment initialized โ
โ 2024/06/14 16:00:37 config.go:86: [INFO]network has been enabled โ
โ 2024/06/14 16:00:37 server.go:19: [INFO]config init success โ
โ 2024/06/14 16:00:37 server.go:23: [PANIC]failed to setup runner dependencies: open dependencies/python-requirements.txt: no such file or directory โ
โ panic: โ
โ โ
โ goroutine 1 [running]: โ
โ github.com/langgenius/dify-sandbox/internal/utils/log.(*Log).Panic(...) โ
โ /home/yeuoly/dify-sandbox/internal/utils/log/core.go:55 โ
โ github.com/langgenius/dify-sandbox/internal/utils/log.Panic({0x493ccd?, 0x16d98?}, {0x40000a7f38?, 0x14820?, 0x4000056768?}) โ
โ /home/yeuoly/dify-sandbox/internal/utils/log/core.go:209 +0x74 โ
โ github.com/langgenius/dify-sandbox/internal/server.initConfig() โ
โ /home/yeuoly/dify-sandbox/internal/server/server.go:23 +0xb0 โ
โ github.com/langgenius/dify-sandbox/internal/server.Run() โ
โ /home/yeuoly/dify-sandbox/internal/server/server.go:51 +0x1c โ
โ main.main() โ
โ /home/yeuoly/dify-sandbox/cmd/server/main.go:6 +0x1c โ
โ Stream closed EOF for dify/dify-sandbox-5549d6d8f8-f5566 (sandbox)
Desktop (please complete the following information):
OS: [e.g. ubuntu 22.04 on WSL2]
Helm version
helm version
version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.22.2"}
Dify version : 0.6.3
Chart: dify-0.20.1
Additional context
kubectl describe on the pod in question:
Name: dify-sandbox-5549d6d8f8-f5566 โ
โ Namespace: dify โ
โ Priority: 0 โ
โ Service Account: default โ
โ Node: turingnode1/192.168.0.50 โ
โ Start Time: Fri, 14 Jun 2024 17:00:29 +0100 โ
โ Labels: app.kubernetes.io/instance=dify โ
โ app.kubernetes.io/name=dify โ
โ component=sandbox โ
โ pod-template-hash=5549d6d8f8 โ
โ Annotations: <none> โ
โ Status: Running โ
โ IP: 10.42.0.173 โ
โ IPs: โ
โ IP: 10.42.0.173 โ
โ Controlled By: ReplicaSet/dify-sandbox-5549d6d8f8 โ
โ Containers: โ
โ sandbox: โ
โ Container ID: containerd://bc415e6a88d77bc63787be0904fdeae713372d999b67d27523fbeba2564d4ccf โ
โ Image: langgenius/dify-sandbox:latest โ
โ Image ID: docker.io/langgenius/dify-sandbox@sha256:09b7e87056739cbd29225779d0b0bef8942adfb33449e92ead40dc19f0f4d89e โ
โ Port: 8194/TCP โ
โ Host Port: 0/TCP โ
โ State: Waiting โ
โ Reason: CrashLoopBackOff โ
โ Last State: Terminated โ
โ Reason: Error โ
โ Exit Code: 2 โ
โ Started: Fri, 14 Jun 2024 17:06:15 +0100 โ
โ Finished: Fri, 14 Jun 2024 17:06:15 +0100 โ
โ Ready: False โ
โ Restart Count: 6 โ
โ Environment Variables from: โ
โ dify-sandbox Secret Optional: false โ
โ Environment: โ
โ GIN_MODE: release โ
โ WORKER_TIMEOUT: 15 โ
โ Mounts: โ
โ /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xxg56 (ro)
Conditions: โ
โ Type Status โ
โ PodReadyToStartContainers True โ
โ Initialized True โ
โ Ready False โ
โ ContainersReady False โ
โ PodScheduled True โ
โ Volumes: โ
โ kube-api-access-xxg56: โ
โ Type: Projected (a volume that contains injected data from multiple sources) โ
โ TokenExpirationSeconds: 3607 โ
โ ConfigMapName: kube-root-ca.crt โ
โ ConfigMapOptional: <nil> โ
โ DownwardAPI: true โ
โ QoS Class: BestEffort โ
โ Node-Selectors: <none> โ
โ Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s โ
โ node.kubernetes.io/unreachable:NoExecute op=Exists for 300s โ
โ Events: โ
โ Type Reason Age From Message โ
โ ---- ------ ---- ---- ------- โ
โ Normal Scheduled 9m25s default-scheduler Successfully assigned dify/dify-sandbox-5549d6d8f8-f5566 to turingnode1 โ
โ Normal Pulled 7m54s (x5 over 9m22s) kubelet Container image "langgenius/dify-sandbox:latest" already present on machine โ
โ Normal Created 7m54s (x5 over 9m22s) kubelet Created container sandbox โ
โ Normal Started 7m54s (x5 over 9m22s) kubelet Started container sandbox โ
โ Warning BackOff 4m17s (x24 over 9m17s) kubelet Back-off restarting failed container sandbox in pod dify-sandbox-5549d6d8f8-f5566_dify(86643f72-5712-4f1a-bcec-ef03a35654ab)
Hello BorisPolonsky,
I am deploying dify to AWS EKS. I will use AWS redis and rds postgres for the DB.
However, the EBS volume does not support ReadWriteMany, so I am looking for another storage type for api/worker
I could not find the docs that could answer my concerns so I would like to ask you something
The only serviceAccount config I can find in the helmchart is for Weaviate and Redis
Hope to have your responses soon
Thank you
Another version update request as Dify came out with a lot of cool features in the latest version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.