is the custom connector placed in your ./actions folder? Or are you mounting a volume to /etc/rasa? I’m asking cause your file MyIO.py has to be reachable from inside the container. Furthermore, you have to override the used Docker images to you use your custom one (ideally in the docker-compose.override.yml)
Doubt: Can i use my custom channel inside my ./actions folder??
Yes. The .actions folder shouldn’t be read by anything to be honest.
please check my updated Dockerfile.Dockerfile (749 Bytes)
I think the reason might be that the custom channel is not in the PYTHONPATH and hence not found. Can you try setting it? It’s the same procedure as it’s described here for custom NLU components.
What exactly is the log message when you run it and it tries to find the channel?
# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:1.10.0
# Use subdirectory as working directory
WORKDIR /app
# Change back to root user to install dependencies
USER root
# Install extra requirements for actions code
RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir boto3 fuzzywuzzy matplotlib && \
pip3 install --no-cache-dir mysql-connector pandas requests
# actions folder to working directory
COPY ./actions /app/actions
COPY ./pdf_report /app/pdf_report
COPY ./MyIo.py /app/MyIo.py
ENV PYTHONPATH=$PYTHONPATH:/app
# By best practices, don't run the code with root user
USER 1001
Can you please try moving the ENV line after USER 1001? Maybe it doesn’t apply when the user was switched Can you please also share the docker-compose.override.yml?
Why are you root in your terminal? Should be 1001 , shouldn’t it?
yes i did some changes in Dockerfile, now i reverted for 1001
maybe try to add a __init__.py to the /app folder
I have no name!@da74e77c3218:/app$ ls -al
-rw-r--r-- 1 root root 0 Jun 17 16:44 __init__.py
drwxrwxrwx 1 root root 4096 Jul 1 03:24 actions
-rwxrwxrwx 1 root root 160 Jun 27 16:46 docker-compose.override.yml
-rwxrwxrwx 1 root root 4206 Jun 17 16:30 docker-compose.yml
.......(all files)
Why are you mounting a custom channel in the action image? Should rather be the Rasa Open Source image, shouldn’t it?
sorry @Tobias_Wochinger,
as per :
mine I am building the custom image for the action server only, I am not building a custom image for the custom channel. please suggest me some solution if anything wrong
can you please suggest me how can I add a custom channel in Rasa open source image.
I have spent two days to firgure it out, and I have done.
The problem was missing packages… which was supposed to be installed when docker image is being made…
When it comes to a custom connector, rasa does not show the proper error message If necessary packages are missing(mysqlclient in my case)
It could be another reason that causes the error, but I am pretty sure the problem is neither about PYTHONPATH nor module paths
My suggestion is that you have to check what packages are missing…