Unable to start Dify from latest docker image due to OpenBLAS Operation not permitted error #397

Closed
opened 2026-02-21 17:27:02 -05:00 by yindo · 7 comments
Owner

Originally created by @Vickzhang on GitHub (Aug 17, 2023).

When attempting to run the latest docker image after clone the project from github, it fails due to an OpenBLAS error with operation not permitted.

Dify version: Self Host
Docker version: 20.10.7
docker-compose version: 1.29.2
Ubuntu: 16.04

Steps To Reproduce

git clone https://github.com/langgenius/dify.git
cd dify/docker
docker compose up

The current behavior

api_1 | Running migrations
api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 6: Operation not permitted
api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 6: Operation not permitted
api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 6: Operation not permitted
api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 6: Operation not permitted
api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 6: Operation not permitted
api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
api_1 |
api_1 | Aborted!
docker_api_1 exited with code 1
worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 6: Operation not permitted
worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 6: Operation not permitted
worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 6: Operation not permitted
worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 6: Operation not permitted
worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 6: Operation not permitted
worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
worker_1 |
worker_1 | Aborted!
docker_worker_1 exited with code 1

Originally created by @Vickzhang on GitHub (Aug 17, 2023). When attempting to run the latest docker image after clone the project from github, it fails due to an OpenBLAS error with operation not permitted. **Dify version: Self Host Docker version: 20.10.7 docker-compose version: 1.29.2 Ubuntu: 16.04** ## Steps To Reproduce <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than Dify. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> ``` git clone https://github.com/langgenius/dify.git cd dify/docker docker compose up ``` ## The current behavior > api_1 | Running migrations api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 6: Operation not permitted api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 6: Operation not permitted api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 6: Operation not permitted api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 6: Operation not permitted api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max api_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 6: Operation not permitted api_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max api_1 | api_1 | Aborted! docker_api_1 exited with code 1 worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 6: Operation not permitted worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 6: Operation not permitted worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 6: Operation not permitted worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 6: Operation not permitted worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max worker_1 | OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 6: Operation not permitted worker_1 | OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max worker_1 | worker_1 | Aborted! docker_worker_1 exited with code 1
yindo closed this issue 2026-02-21 17:27:02 -05:00
Author
Owner

@caolixiang commented on GitHub (Aug 17, 2023):

在docker-compose.yaml的api、worker中增加
privileged: true

 api:
    image: langgenius/dify-api:latest
    restart: always
    privileged: true
    ...

worker:
    image: langgenius/dify-api:latest
    restart: always
    privileged: true
    ...
@caolixiang commented on GitHub (Aug 17, 2023): 在docker-compose.yaml的api、worker中增加 `privileged: true` ``` api: image: langgenius/dify-api:latest restart: always privileged: true ... worker: image: langgenius/dify-api:latest restart: always privileged: true ... ```
Author
Owner

@crazywoola commented on GitHub (Aug 17, 2023):

Seems a general permission issue to me, you could try @caolixiang 's suggestion. If you still have the problem, you could reopen this issue.

@crazywoola commented on GitHub (Aug 17, 2023): Seems a general permission issue to me, you could try @caolixiang 's suggestion. If you still have the problem, you could reopen this issue.
Author
Owner

@Vickzhang commented on GitHub (Aug 17, 2023):

在docker-compose.yaml的api、worker中增加 privileged: true

 api:
    image: langgenius/dify-api:latest
    restart: always
    privileged: true
    ...

worker:
    image: langgenius/dify-api:latest
    restart: always
    privileged: true
    ...

Thank you. That works for me .

@Vickzhang commented on GitHub (Aug 17, 2023): > 在docker-compose.yaml的api、worker中增加 `privileged: true` > > ``` > api: > image: langgenius/dify-api:latest > restart: always > privileged: true > ... > > worker: > image: langgenius/dify-api:latest > restart: always > privileged: true > ... > ``` Thank you. That works for me .
Author
Owner

@wwek commented on GitHub (Mar 13, 2024):

Same promble
Thanks

@wwek commented on GitHub (Mar 13, 2024): Same promble Thanks
Author
Owner

@feng-1985 commented on GitHub (Jun 15, 2024):

在docker-compose.yaml的sandbox也增加 privileged: true

 sandbox:
    image: langgenius/dify-sandbox:0.2.1
    restart: always
    privileged: true
@feng-1985 commented on GitHub (Jun 15, 2024): 在docker-compose.yaml的sandbox也增加 privileged: true ``` sandbox: image: langgenius/dify-sandbox:0.2.1 restart: always privileged: true ```
Author
Owner

@htguan commented on GitHub (Mar 1, 2025):

在docker-compose.yaml的sandbox也增加 privileged: true

 sandbox:
    image: langgenius/dify-sandbox:0.2.1
    restart: always
    privileged: true

可是沙盒都加privileged,也太不安全了吧

@htguan commented on GitHub (Mar 1, 2025): > 在docker-compose.yaml的sandbox也增加 privileged: true > > ``` > sandbox: > image: langgenius/dify-sandbox:0.2.1 > restart: always > privileged: true > ``` 可是沙盒都加privileged,也太不安全了吧
Author
Owner

@wengmankai commented on GitHub (Mar 12, 2025):

Thanks!

@wengmankai commented on GitHub (Mar 12, 2025): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#397