Error in Rasa docker

I get following error when running command below

linttu@linttu-VirtualBox:~$ sudo docker-compose up

[sudo] password for linttu: Starting linttu_rasa_1 … Starting linttu_rasa_1 … done Attaching to linttu_rasa_1 rasa_1 | Traceback (most recent call last): rasa_1 | File “/opt/venv/bin/rasa”, line 8, in rasa_1 | sys.exit(main()) rasa_1 | File “/opt/venv/lib/python3.7/site-packages/rasa/main.py”, line 92, in main rasa_1 | cmdline_arguments.func(cmdline_arguments) rasa_1 | File “/opt/venv/lib/python3.7/site-packages/rasa/cli/run.py”, line 106, in run rasa_1 | args.model = _validate_model_path(args.model, “model”, DEFAULT_MODELS_PATH) rasa_1 | File “/opt/venv/lib/python3.7/site-packages/rasa/cli/run.py”, line 64, in _validate_model_path rasa_1 | os.makedirs(default, exist_ok=True) rasa_1 | File “/usr/local/lib/python3.7/os.py”, line 223, in makedirs rasa_1 | mkdir(name, mode) rasa_1 | PermissionError: [Errno 13] Permission denied: 'models’ linttu_rasa_1 exited with code 1

My environment

linttu@linttu-VirtualBox:~$ docker -v && docker-compose -v

Docker version 19.03.12, build 48a66213fe

docker-compose version 1.17.1, build unknown

linttu@linttu-VirtualBox:~$ uname -a

Linux linttu-VirtualBox 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

runniung in Oracle virtualbox

what does your docker-compose look like? My guess is that you are mounting a directory but the container user doesn’t have permission for read it.