You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

entrypoint-parser.sh 706B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # replace env variables in the service_conf.yaml file
  3. rm -rf /ragflow/conf/service_conf.yaml
  4. while IFS= read -r line || [[ -n "$line" ]]; do
  5. # Use eval to interpret the variable with default values
  6. eval "echo \"$line\"" >> /ragflow/conf/service_conf.yaml
  7. done < /ragflow/conf/service_conf.yaml.template
  8. export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
  9. PY=python3
  10. CONSUMER_NO_BEG=$1
  11. CONSUMER_NO_END=$2
  12. function task_exe(){
  13. JEMALLOC_PATH=$(pkg-config --variable=libdir jemalloc)/libjemalloc.so
  14. while [ 1 -eq 1 ]; do
  15. LD_PRELOAD=$JEMALLOC_PATH $PY rag/svr/task_executor.py $1;
  16. done
  17. }
  18. for ((i=CONSUMER_NO_BEG; i<CONSUMER_NO_END; i++))
  19. do
  20. task_exe $i &
  21. done
  22. wait;