Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vickzhang opened this issue Aug 17, 2023 · 7 comments

Comments

@Vickzhang
Copy link

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

@caolixiang
Copy link

caolixiang commented 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
    ...

@crazywoola
Copy link
Member

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

@Vickzhang
Copy link
Author

在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 .

@wwek
Copy link

wwek commented Mar 13, 2024

Same promble
Thanks

@feng-1985
Copy link

feng-1985 commented Jun 15, 2024

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

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

@htguan
Copy link

htguan commented Mar 1, 2025

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

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

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

@dosubot dosubot bot mentioned this issue Mar 8, 2025
5 tasks
@wengmankai
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants