Rasa 2.0.0rc1 in container - permission denied: '/.config'

Hi all,

I’m starting rasa in a docker with:

docker run --rm -it --volume $(pwd)/app:/app rasa/rasa:2.0.0rc1-full shell

I keep getting errors:

Failed to write global config. Error: [Errno 13] Permission denied: '/.config'. Skipping.

all the files in ./app are read-writeable by user, group & others, just for good measure.

I’ve also tried the command with the --user option to run as myself:

docker run --rm -it --user $(id -u):$(id -g) --volume $(pwd)/app:/app rasa/rasa:2.0.0rc1-full shell

rasa works, but every time I run the above, I get:

Downloading TF-Hub Module 'http://models.poly-ai.com/convert/v1/model.tar.gz'. Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 42.35MB

… etc

Is that related to the /.config error? Or is that what is supposed to happen?

Thanks!

1 Like

Hi, I’m having the same issue. Just to check something. What happens if you run as --user root ?

Regarding Failed to write global config. Error: [Errno 13] Permission denied: '/.config'. Skipping., is because matplotlib is trying to write its config file to that location. It doesn’t have permission to do that because the user set in the Rasa server Dockerfile is a non-root user with UID 1001 (since it’s considered good practice to execute your programs on the container with a normal user).

You can check this because after those error messages, there’s this:

Matplotlib created a temporary config/cache directory at /tmp/matplotlib-ldyhm_it because the default path (/.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.

It shouldn’t be a problem for you, but you can easily fix it by modifying the rasa-production and rasa-worker services in the docker-compose.override.yml file and setting the environment variable MPLCONFIGDIR to the directory where you would like to save matplotlib configuration files (in case you are using a docker-compose deployment as per Rasa own tutorials).

Then, regarding the model download, Rasa server checks every 10 seconds if there’s a new model available in the Rasa X server. It is not related to matplotlib config files.