diff options
author | 2019-12-16 15:00:46 -0800 | |
---|---|---|
committer | 2019-12-16 15:00:46 -0800 | |
commit | 6380c69aa5c1c1d140239926a8ef131248c51416 (patch) | |
tree | ae5be2e12639487dde3a4d85c51c3c2caf7076a0 | |
parent | Merge pull request #52 from python-discord/ci-test (diff) |
Limit numpy to using 1 thread
-rw-r--r-- | scripts/.profile | 5 | ||||
-rw-r--r-- | snekbox/nsjail.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/.profile b/scripts/.profile index bd46a17..daaf1dd 100644 --- a/scripts/.profile +++ b/scripts/.profile @@ -19,6 +19,11 @@ nsjpy() { --rlimit_as 700 \ --chroot / \ -E LANG=en_US.UTF-8 \ + -E OMP_NUM_THREADS=1 \ + -E OPENBLAS_NUM_THREADS=1 \ + -E MKL_NUM_THREADS=1 \ + -E VECLIB_MAXIMUM_THREADS=1 \ + -E NUMEXPR_NUM_THREADS=1 \ -R/usr -R/lib -R/lib64 \ --user 65534 \ --group 65534 \ diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index d3c893d..f160aa8 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -121,6 +121,11 @@ class NsJail: "--rlimit_as", "700", "--chroot", "/", "-E", "LANG=en_US.UTF-8", + "-E", "OMP_NUM_THREADS=1", + "-E", "OPENBLAS_NUM_THREADS=1", + "-E", "MKL_NUM_THREADS=1", + "-E", "VECLIB_MAXIMUM_THREADS=1", + "-E", "NUMEXPR_NUM_THREADS=1", "-R/usr", "-R/lib", "-R/lib64", "--user", "65534", # nobody "--group", "65534", # nobody/nogroup |