M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 10:56am
1
Hi ,
i am trying to run my action server on docker. The problem is when i check the log, they said that they cand find the module ruamel.yaml and i specified it in the requirements-actins.txt in the actions folder
can someone help me please
i have already configured the docker-compose file the Dockerfile etc…
ChrisRahme
(Chris Rahmé)
August 13, 2021, 11:05am
2
Please share your Dockerfile and Docker-Compose file.
M_R_LY:
requirements-actins.txt
Make sure you haven’t made a typo in the file.
M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 11:09am
3
DockerFile :
the requirements-actions.txt
the logs :
ChrisRahme
(Chris Rahmé)
August 13, 2021, 11:13am
4
Maybe your pip
is pointing at Python 2. Try to use pip3
instead.
M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 11:16am
5
i tried to update pip in dockerfile, does this have any effect?
ChrisRahme
(Chris Rahmé)
August 13, 2021, 11:19am
6
python
could mean Python 2, so you are still updating Python 2’s pip.
In your terminal, write python -V
and pip -V
to see the Python and Pip versions. In the same way, write python3 -V
and pip3 -V
.
If python
points to Python 2, you will need to use python3
and pip3
in your Dockerfile instead of python
and pip
.
ChrisRahme
(Chris Rahmé)
August 13, 2021, 11:26am
8
Okay now just use python3
and pip3
in your Dockerfile instead of python
and pip
:
FROM rasa/rasa-sdk:latest
WORKDIR /app
COPY actions/requirements-actions.txt ./
USER root
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements-actions.txt
COPY /actions /app/actions
RUN rasa run actions
USER 1001
nik202
(NiK202)
August 13, 2021, 12:24pm
10
@M_R_LY Hello!
where is you requirement file in action folder?
FROM rasa/rasa-sdk:latest
WORKDIR /app
COPY requirements.txt requirement.txt
USER root
RUN pip install - r requirement.txt
EXPOSE 5055
USER 1001
change the name to simple requirement.txt
try and tell me.
M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 12:28pm
11
yes the requirements-actions.txt is in the actions folder
ok let me try it
i should change this line too ?
nik202
(NiK202)
August 13, 2021, 12:29pm
12
@M_R_LY try please, what code I given.
@M_R_LY Should I share for rasa version also? @M_R_LY please mention me in every post, else I not get a notification.
@M_R_LY Even you can check this detail thread of my with the solution.
I hope this will help you to solve your query.
M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 12:39pm
13
@nik202 is it always necessary to use dockerhub, i dont want to use it right now
@nik202 in my actions folder in the /etc/rasa i have renamed the requirements-actions.txt into requirements.txt
so is that good ? @nik202
and this is the file where i call it @nik202
nik202
(NiK202)
August 13, 2021, 12:42pm
14
@M_R_LY No, using docker hub; I said because you can monitor the image and container using docker desktop, so ignore it.
@M_R_LY You need to run and check. For me which I mentioned in the thread is working, give it a try and we will see
@M_R_LY Hope you mentioned all the packages and dependencies required for this code in requirement.txt ?
M_R_LY
(Majnun Jaahil🌪™)
August 13, 2021, 12:51pm
15
@nik202 yes i have mentionned it here it is
i have tried both of them but still am getting the same error @nik202
nik202
(NiK202)
August 13, 2021, 1:14pm
16
@M_R_LY Strange…Have you seen my thread which I shared to you?
M_R_LY
(Majnun Jaahil🌪™)
August 14, 2021, 12:29am
17
@nik202 yes but unfortunatly it doesnt work for me
this are my step @nik202
download the script and run it like they said here
curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/0.42.0/install.sh
configure the dockerfile and the docker-compose.override file with
copy the actions folder in the /etc/rasa with the requirements file inside it
and try to run it with docker-compose up -d
thats it @nik202
nik202
(NiK202)
August 14, 2021, 12:30am
18
@M_R_LY its running now?
@M_R_LY your topic thread is related to Rasa open source not rasa x and you trying rasa-x?
@M_R_LY my suggestion and solution is based on rasa open source only and its working.
If it’s working good, good luck!
M_R_LY
(Majnun Jaahil🌪™)
August 14, 2021, 12:40am
19
When i check the logs it says that the package is not disponible
in the requirements.txt
and this is the file where i call it @nik202
and the logs
@nik202
nik202
(NiK202)
August 14, 2021, 11:15am
20
@M_R_LY try this update in action.py
import ruamel_yaml as yaml
or
import ruamel_yaml as yaml
Or
add CMD in docker file to install
pip3 install ruamel.yml