docker启动报错:OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 32:

获取中...

在客户现场遇到个问题,客户的正式环境是通过虚拟机软件分配下来的系统,在这个虚拟机里安装docker后,启动某些镜像的docker直接会停止,同样的镜像在云端服务器等测试环境是没问题的(测试环境非虚拟机)查看报错信息:
OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 32: Operation not permitted
OpenBLAS blas_thread_init: ensure that your address space and process count limits are big enough (ulimit -a)
OpenBLAS blas_thread_init: or set a smaller OPENBLAS_NUM_THREADS to fit into what you have available
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max

报错的提示是查询ulimit -a 来看下系统的线程数限制,但其实发现也没啥问题

后续查阅各种资料,在docker的启动命令里增加以下2个参数解决这个问题:

 --security-opt seccomp=unconfined 
 --cap-add=SYS_RESOURCE

非常神奇。。。。

打赏
评论区
头像