ragflow/docker/entrypoint.sh
KevinHuSh 23b448cf96
fix docker compose issue (#238)
### What problem does this PR solve?

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

Issue link:#[[Link the issue
here](https://github.com/infiniflow/ragflow/issues/226)]

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2024-04-07 09:04:32 +08:00

40 lines
575 B
Bash

#!/bin/bash
/usr/sbin/nginx
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
PY=/root/miniconda3/envs/py11/bin/python
function task_exe(){
while [ 1 -eq 1 ];do
$PY rag/svr/task_executor.py $1 $2;
done
}
function watch_broker(){
while [ 1 -eq 1 ];do
C=`ps aux|grep "task_broker.py"|grep -v grep|wc -l`;
if [ $C -lt 1 ];then
$PY rag/svr/task_broker.py &
fi
sleep 5;
done
}
function task_bro(){
sleep 160;
watch_broker;
}
task_bro &
WS=2
for ((i=0;i<WS;i++))
do
task_exe $i $WS &
done
$PY api/ragflow_server.py
wait;