File size: 464 Bytes
1a7ee60
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# Wrapper script to run API server with environment variables set
# This prevents TensorFlow/PaddlePaddle mutex warnings

export KMP_DUPLICATE_LIB_OK=TRUE
export OMP_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export MKL_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export TF_CPP_MIN_LOG_LEVEL=2

# Redirect stderr to filter out mutex warnings
python api_server.py 2>&1 | grep -v "mutex.cc" | grep -v "RAW: Lock blocking"