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.

12345678910111213141516171819202122232425262728293031323334353637
  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. # unset http proxy which maybe set by docker daemon
  9. export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""
  10. /usr/sbin/nginx
  11. export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
  12. PY=python3
  13. if [[ -z "$WS" || $WS -lt 1 ]]; then
  14. WS=1
  15. fi
  16. function task_exe(){
  17. while [ 1 -eq 1 ];do
  18. $PY rag/svr/task_executor.py $1;
  19. done
  20. }
  21. for ((i=0;i<WS;i++))
  22. do
  23. task_exe $i &
  24. done
  25. while [ 1 -eq 1 ];do
  26. $PY api/ragflow_server.py
  27. done
  28. wait;