Hello,
I’m using Rasa and Rasa-X for a bit more than a month. I want to use Custom Actions, and I need to include some dependencies which are not included in rasa_sdk default image. I followed the guide (https://hub.docker.com/r/rasa/rasa-sdk) and read about other users that had the same issue, but I could not solve it and have a “Permission Denied” error.
Building app
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/compose/cli/main.py", line 72, in main
command()
File "/usr/local/lib/python3.6/dist-packages/compose/cli/main.py", line 128, in perform_command
handler(command, command_options)
File "/usr/local/lib/python3.6/dist-packages/compose/cli/main.py", line 303, in build
progress=options.get('--progress'),
File "/usr/local/lib/python3.6/dist-packages/compose/project.py", line 403, in build
build_service(service)
File "/usr/local/lib/python3.6/dist-packages/compose/project.py", line 385, in build_service
service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
File "/usr/local/lib/python3.6/dist-packages/compose/service.py", line 1106, in build
platform=self.platform,
File "/usr/local/lib/python3.6/dist-packages/docker/api/build.py", line 160, in build
path, exclude=exclude, dockerfile=dockerfile, gzip=gzip
File "/usr/local/lib/python3.6/dist-packages/docker/utils/build.py", line 30, in tar
files=sorted(exclude_paths(root, exclude, dockerfile=dockerfile[0])),
File "/usr/local/lib/python3.6/dist-packages/docker/utils/build.py", line 49, in exclude_paths
return set(pm.walk(root))
File "/usr/local/lib/python3.6/dist-packages/docker/utils/build.py", line 214, in rec_walk
for sub in rec_walk(cur):
File "/usr/local/lib/python3.6/dist-packages/docker/utils/build.py", line 184, in rec_walk
for f in os.listdir(current_dir):
PermissionError: [Errno 13] Permission denied: '/etc/rasa/certs'
This happens when I try to build the custom image.
Here is my Dockerfile
:
# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:1.10.0
USER root
# To install packages from PyPI
RUN pip3 install --no-cache-dir pytz==2019.3
USER 1001
And my docker-compose.override.yml
is
version: '3.4'
services:
rabbit:
ports:
- "5672:5672"
app:
# image: 'rasa/rasa-sdk:latest'
build:
context: .
dockerfile: Dockerfile
volumes:
- './actions:/app/actions'
- './ressources:/app/ressources'
expose:
- '5055'
I tried several options but none of them seem to work. Do you know how I could fix this issue?
(I also did a issue on Github Error ‘Permission Denied’ using Docker to install custom dependencies · Issue #5789 · RasaHQ/rasa · GitHub)
Thanks a lot, Julien