Skip to content

Commit 2c3d037

Browse files
committed
add readme
1 parent f8b58c8 commit 2c3d037

File tree

1 file changed

+6
-0
lines changed
  • public_dropin_environments/python3_xgboost

1 file changed

+6
-0
lines changed

public_dropin_environments/python3_xgboost/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ ENV ADDRESS=0.0.0.0:8080
5959
ENV WITH_ERROR_SERVER=0 \
6060
PYTHONUNBUFFERED=1
6161

62+
# OMP_NUM_THREADS is an environment variable that controls the maximum number of threads used by programs that rely on OpenMP for parallel processing.
63+
# In libraries like XGBoost, it limits the number of CPU threads used for computation, helping to prevent resource contention and hangs in multi-worker environments.
64+
# Setting OMP_NUM_THREADS=1 forces XGBoost to use only one thread per process.
65+
# If we need to use wekzeug max_workers > 1 in DRUM, we must set OMP_NUM_THREADS=1 to avoid potential hangs.
66+
# Maybe the same would apply to gunicorn, when we test.
67+
# ENV OMP_NUM_THREADS=1
6268

6369
COPY ./*.sh ${CODE_DIR}/
6470
WORKDIR ${CODE_DIR}

0 commit comments

Comments
 (0)