Issues running Rasa with Docker

Hello,

I am trying to running Rasa by following the instructions provided in Using Docker | Rasa Documentation. Unfortunately, I am getting the error shown below. Has anyone else encountered this problem?

I am currently using Ubuntu 24.04.2.

local@local-ThinkPad-P51:~$ docker run -v ~/Documents/rasa-demo2:/app      
       -e RASA_PRO_LICENSE=${RASA_PRO_LICENSE}        
     rasa/rasa-pro:3.12.6       
      init --no-prompt --template tutorial
Matplotlib created a temporary cache directory at /tmp/matplotlib-hbd8k565 because the default 
path (/app/.config/matplotlib) is not a writable directory; it is highly recommended to set the 
MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the 
import of Matplotlib and to better support multiprocessing.
2025-05-08 15:55:02 WARNING  rasa.utils.common  - Failed to write global config. Error: [Errno 
13] Permission denied: '/app/.config'. Skipping.
2025-05-08 15:55:02 WARNING  rasa.utils.common  - Failed to write global config. Error: [Errno 
13] Permission denied: '/app/.config'. Skipping.
Warning: Input is not a terminal (fd=0).
2025-05-08 15:55:03 INFO     root  - creating actions
2025-05-08 15:55:03 ERROR    rasa.__main__  - {"event_info": "DistutilsFileError: could not 
create 'actions': Permission denied", "event": "cli.exception.general_exception", "level": "error", 
"exception": [{"exc_type": "DistutilsFileError", "exc_value": "could not create 'actions': Permission
 denied", "syntax_error": null, "is_cause": false, "frames": [{"filename": 
"/opt/venv/lib/python3.10/site-packages/rasa/__main__.py", "lineno": 148, "name": "main", "line": 
"", "locals": {"raw_arguments": "None", "arg_parser": "'ArgumentParser(prog=\\'rasa\\', 
usage=None, description=\"Rasa command line interface'+294", "cmdline_arguments": 
"'Namespace(loglevel=None, logging_config_file=None, no_prompt=True, init_dir=None'+93", 
"log_level": "None", "logging_config_file": "None", "is_studio_command": "False", "result": "[]", 
"endpoints_file": "None", "exc": "DistutilsFileError(\"could not create 'actions': Permission 
denied\")"}}, {"filename": "/opt/venv/lib/python3.10/site-packages/rasa/cli/scaffold.py", "lineno": 
273, "name": "run", "line": "", "locals": {"args": "'Namespace(loglevel=None, 
logging_config_file=None, no_prompt=True, init_dir=None'+93", "questionary": "\"<module 
'questionary' from '/opt/venv/lib/python3.10/site-packages/questionary/_\"+12", "path": "."}}, 
{"filename": "/opt/venv/lib/python3.10/site-packages/rasa/cli/scaffold.py", "lineno": 154, "name": 
"init_project", "line": "", "locals": {"args": "'Namespace(loglevel=None, logging_config_file=None, 
no_prompt=True, init_dir=None'+93", "path": "."}}, {"filename": "/opt/venv/lib/python3.10/site-
packages/rasa/cli/scaffold.py", "lineno": 165, "name": "create_initial_project", "line": "", "locals": 
{"path": ".", "template": "<ProjectTemplateName.TUTORIAL: 'tutorial'>", "copy_tree": "<function 
copy_tree at 0x7ac20b13d3f0>"}}, {"filename": "/opt/venv/lib/python3.10/site-
packages/setuptools/_distutils/dir_util.py", "lineno": 168, "name": "copy_tree", "line": "", "locals": 
{"src": "/opt/venv/lib/python3.10/site-packages/rasa/cli/project_templates/tutorial", "dst": ".", 
"preserve_mode": "1", "preserve_times": "1", "preserve_symlinks": "0", "update": "0", "verbose": 
"1", "dry_run": "0", "copy_file": "<function copy_file at 0x7ac20b13df30>", "names": "\"['actions', 
'endpoints.yml', 'config.yml', 'credentials.yml', 'data', 'domain.ym\"+3", "outputs": "[]", "n": 
"actions", "src_name": "'/opt/venv/lib/python3.10/site-
packages/rasa/cli/project_templates/tutorial/actio'+2", "dst_name": "./actions"}}, {"filename": 
"/opt/venv/lib/python3.10/site-packages/setuptools/_distutils/dir_util.py", "lineno": 146, "name": 
"copy_tree", "line": "", "locals": {"src": "'/opt/venv/lib/python3.10/site-
packages/rasa/cli/project_templates/tutorial/actio'+2", "dst": "./actions", "preserve_mode": "1", 
"preserve_times": "1", "preserve_symlinks": "0", "update": "0", "verbose": "1", "dry_run": "0", 
"copy_file": "<function copy_file at 0x7ac20b13df30>", "names": "['actions.py', '__init__.py', 
'__pycache__']"}}, {"filename": "/opt/venv/lib/python3.10/site-
packages/setuptools/_distutils/dir_util.py", "lineno": 77, "name": "mkpath", "line": "", "locals": 
{"name": "actions", "mode": "511", "verbose": "1", "dry_run": "0", "created_dirs": "[]", "head": 
"actions", "tail": "actions", "tails": "['actions']", "d": "actions", "abs_head": "/app/actions"}}]}, 
{"exc_type": "PermissionError", "exc_value": "[Errno 13] Permission denied: 'actions'", 
"syntax_error": null, "is_cause": false, "frames": [{"filename": "/opt/venv/lib/python3.10/site-
packages/setuptools/_distutils/dir_util.py", "lineno": 74, "name": "mkpath", "line": "", "locals": 
{"name": "actions", "mode": "511", "verbose": "1", "dry_run": "0", "created_dirs": "[]", "head": 
"actions", "tail": "actions", "tails": "['actions']", "d": "actions", "abs_head": "/app/actions"}}]}]}
Welcome to Rasa! 🤖


Hi @ntntnlstdnt

Thanks for sharing the error message! It looks like the issue is caused because the directory you mounted (~/Documents/rasa-demo2) is read-only inside the Docker container. Rasa is trying to create a folder called actions inside that directory, but it doesn’t have permission to do so, that’s why you’re seeing:

PermissionError: [Errno 13] Permission denied: 'actions'

Try changing permissions for this directory by running this command

chmod -R a+w ~/Documents/rasa-demo2

Please let me know if this helped to resolve the issue.

1 Like

Thank you for the prompt response, @m_ashurkina. Changing the permission worked! However, the docker container exited after the training. Is the intended behavior? I assume the container should persist if I am to run rasa inpect in the folder as instructed in the installation log. I also ran docker ps and docker ps -a to check if there are any containers running and the history of ran containers.

...
Welcome to Rasa! 🤖

By installing and using this software, you agree to be bound by the terms and conditions of the 
Developer Terms available at https://rasa.com/developer-terms. Please review the Developer 
Terms carefully before proceeding.

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

Created project directory at '/app'.
Finished creating project structure.
Training an initial model...

------------------------------------------------------
Want to help shape the future of Rasa Pro?
Share your feedback in a short conversation with our team.
Sign up at: https://calendly.com/alvaro-rasa/rasa-pro-installation
------------------------------------------------------

If you want to speak to the assistant, run 'rasa inspect' at any time inside the project directory.
local@local-ThinkPad-P51:~/Documents/rasa-demo2$ ls
actions  config.yml  credentials.yml  data  domain.yml  endpoints.yml  models
local@local-ThinkPad-P51:~/Documents/rasa-demo2$ rasa inspect
rasa: command not found
local@local-ThinkPad-P51:~/Documents/rasa-demo2$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
local@local-ThinkPad-P51:~/Documents/rasa-demo2$ docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS                        PORTS     NAMES
eea86a4029a6   rasa/rasa-pro:3.12.6              "rasa init --no-prom…"   7 minutes ago    Exited 
(0) 7 minutes ago                great_solomon
a0a9ce123da1   rasa/rasa-pro:3.12.6              "rasa init --no-prom…"   14 minutes ago   Exited 
(1) 14 minutes ago               peaceful_williamson
36b8ce0c0df4   rasa/rasa-pro:3.12.6              "rasa init --no-prom…"   32 minutes ago   Exited (0) 31 minutes ago               clever_villani