Rasa deployement : Cannot find ruamel.yaml on docker compose

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…

Please share your Dockerfile and Docker-Compose file.

Make sure you haven’t made a typo in the file.

DockerFile :

the requirements-actions.txt image

the logs :

Maybe your pip is pointing at Python 2. Try to use pip3 instead.

i tried to update pip in dockerfile, does this have any effect?

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.

i mean :sob: :sob:

so instead of

python -m pip install --upgrade pip

pip install -r requirements-actions.txt

its

python3 -m pip3 install --upgrade pip

pip3 install -r requirements-actions.txt

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

still the same error :sob:

**

  • and it looks like it uses 3.8 when look the selected line in the logs

**

@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.

yes the requirements-actions.txt is in the actions folder

ok let me try it

i should change this line too ?

@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.

@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 image

@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 :slight_smile:

@M_R_LY Hope you mentioned all the packages and dependencies required for this code in requirement.txt ?

@nik202 yes i have mentionned it here it is

image

i have tried both of them but still am getting the same error @nik202

@M_R_LY Strange…Have you seen my thread which I shared to you?

@nik202 yes but unfortunatly it doesnt work for me

this are my step @nik202

  1. 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

  2. configure the dockerfile and the docker-compose.override file with

  3. copy the actions folder in the /etc/rasa with the requirements file inside it

  4. and try to run it with docker-compose up -d

thats it @nik202

@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!

When i check the logs it says that the package is not disponible

in the requirements.txt image

and this is the file where i call it @nik202 image

and the logs :sob:

@nik202

@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