[Docker] - Rasa init error
See original GitHub issueRasa version: Latest (1.4.1) - See on Docker Hub
Docker & docker-compose versions: Docker version 19.03.4, build 9013bf583a docker-compose version 1.24.1, build 4667896b
Operating system (windows, osx, …): Ubuntu 18.04.3 LTS
Issue: With a brand new installation of Docker, dating from the day, it is impossible to launch rasa commands (init, train_nlu, …) via Docker as described in the docs.
I tried with an empty current directory and a non-empty current directory (where volume is mounted) : the result is the same, leading to the error below.
I am connected as root, so the problem is not due to rights or anything else (about ten other diverse containers are currently working without any problem on the same machine)
Note: I have never encountered this problem with previous versions of the rasa:latest and rasa_latest-full images.
Error (including full traceback):
root@xyz:/path/to/my/project# docker run -v $(pwd):/app rasa/rasa:latest init --no-prompt
Unable to find image 'rasa/rasa:latest' locally
latest: Pulling from rasa/rasa
[...]
Status: Downloaded newer image for rasa/rasa:latest
Warning: Output is not to a terminal (fd=1).
Warning: Input is not to a terminal (fd=0).
Welcome to Rasa! 🤖
To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/distutils/dir_util.py", line 70, in mkpath
os.mkdir(head, mode)
PermissionError: [Errno 13] Permission denied: '__pycache__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/bin/rasa", line 11, in <module>
load_entry_point('rasa==1.5.0a1', 'console_scripts', 'rasa')()
File "/build/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
cmdline_arguments.func(cmdline_arguments)
File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 195, in run
init_project(args, path)
File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 111, in init_project
create_initial_project(path)
File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 119, in create_initial_project
copy_tree(scaffold_path(), path)
File "/usr/local/lib/python3.6/distutils/dir_util.py", line 159, in copy_tree
verbose=verbose, dry_run=dry_run))
File "/usr/local/lib/python3.6/distutils/dir_util.py", line 135, in copy_tree
mkpath(dst, verbose=verbose)
File "/usr/local/lib/python3.6/distutils/dir_util.py", line 74, in mkpath
"could not create '%s': %s" % (head, exc.args[-1]))
distutils.errors.DistutilsFileError: could not create '__pycache__': Permission denied
Command or request that led to error:
docker run -v $(pwd):/app rasa/rasa:latest init --no-prompt
or
docker run -v $(pwd):/app rasa/rasa:latest-full init --no-prompt
Thanks in advance and best regards TBX
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (3 by maintainers)
Top GitHub Comments
Thanks to @AndiLeni for posting the link of the rasa forum where the issue is posted, and @ArjaanBuijk for giving a simple solution in the forum, that worked excellent for me. I am just posting it here for the convenience,
cd your_dir stat . checke the uid permission of the dir. if you dont have permission,then mkdir, do as the tutorial