dashi6174 commited on
Commit
c008ff2
·
1 Parent(s): bf1e3ff

Set the number of task_executor processes through the environment variable WS. (#846)

Browse files

### What problem does this PR solve?


### Type of change

- [x] Other (please describe): Use environment variable to control the
task executor processor number.

Files changed (1) hide show
  1. docker/entrypoint.sh +3 -1
docker/entrypoint.sh CHANGED
@@ -5,6 +5,9 @@
5
  export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
6
 
7
  PY=python3
 
 
 
8
 
9
  function task_exe(){
10
  while [ 1 -eq 1 ];do
@@ -12,7 +15,6 @@ function task_exe(){
12
  done
13
  }
14
 
15
- WS=1
16
  for ((i=0;i<WS;i++))
17
  do
18
  task_exe &
 
5
  export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
6
 
7
  PY=python3
8
+ if [[ -z "$WS" || $WS -lt 1 ]]; then
9
+ WS=1
10
+ fi
11
 
12
  function task_exe(){
13
  while [ 1 -eq 1 ];do
 
15
  done
16
  }
17
 
 
18
  for ((i=0;i<WS;i++))
19
  do
20
  task_exe &