OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

[Bug] Docker image fails to start

Open pmatos opened this issue 2 years ago • 3 comments

docker-compose.x11.yaml.gz docker-compose.yaml.gz Describe the bug First time running I get:

docker compose -f docker-compose.yaml -f docker-compose.x11.yaml run openbb



[+] Building 0.0s (0/0)                                                                                 docker:default
[+] Building 0.0s (0/0)                                                                                 docker:default
Traceback (most recent call last):
  File "/home/python/terminal.py", line 44, in <module>
    main()
  File "/home/python/terminal.py", line 17, in main
    cfg.setup_config_terminal()
  File "/home/python/openbb_terminal/config_terminal.py", line 142, in setup_config_terminal
    init_userdata()
  File "/home/python/openbb_terminal/core/config/paths_helper.py", line 78, in init_userdata
    create_paths(dirs_list)
  File "/home/python/openbb_terminal/core/config/paths_helper.py", line 22, in create_paths
    dirs.mkdir(
  File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/home/python/OpenBBUserData/styles'

To Reproduce On arch linux download the attached yaml files and run docker compose -f docker-compose.yaml -f docker-compose.x11.yaml run openbb

Desktop (please complete the following information):

  • OS: ArchLinux
  • Python version Dockerized Openbb

Additional Information

OpenBBUserData folder exists in the root of my home but is empty.

ls -la OpenBBUserData
total 16
drwxr-xr-x  2 root   root    4096 23. Okt 21:51 .
drwx------ 75 pmatos pmatos 12288 23. Okt 21:57 ..

pmatos avatar Oct 23 '23 19:10 pmatos

OpenBBUserData folder exists in the root of my home but is empty.

If you give Docker permission to this folder/path, does the issue persist?

deeleeramone avatar Oct 24 '23 18:10 deeleeramone

I also faced a similar issue. The way I got through it was to run the container as a root user (I'm on WSL). You can try a few things, or Google something similar, depending on your needs:

docker --exec it -user root /bin/bash docker --exec it -user root <container name or ID> docker-compose exec --user root bash docker exec -u root bash

https://www.youtube.com/watch?v=WUwjbzX-vR4&t=200s

You can also refer to this video, at 3:18-3:22 you can see the command that solves the Permission Error

Inder782 avatar Oct 28 '23 06:10 Inder782

Just wanted to share a workaround I found. If you create the folder OpenBBUserData and .openbb_terminal with your ubuntu user in your home, then docker compose -f docker-compose.yaml -f docker-compose.x11.yaml run openbb will work with no errors

cardiosMircem avatar Feb 28 '24 16:02 cardiosMircem