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.sh 559B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. /usr/sbin/nginx
  3. export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
  4. PY=/root/miniconda3/envs/py11/bin/python
  5. function task_exe(){
  6. sleep 60;
  7. while [ 1 -eq 1 ];do mpirun -n 4 --allow-run-as-root $PY rag/svr/task_executor.py ; done
  8. }
  9. function watch_broker(){
  10. while [ 1 -eq 1 ];do
  11. C=`ps aux|grep "task_broker.py"|grep -v grep|wc -l`;
  12. if [ $C -lt 1 ];then
  13. $PY rag/svr/task_broker.py &
  14. fi
  15. sleep 5;
  16. done
  17. }
  18. function task_bro(){
  19. sleep 60;
  20. watch_broker;
  21. }
  22. task_bro &
  23. task_exe &
  24. $PY api/ragflow_server.py
  25. wait;