Can't get custom action to work with docker-compose

Tried whole slew of things from forum (thanks devs!).

Create Dockerfile:

# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:1.6.1

COPY actions /app/actions/

# Add a custom system library
RUN apt-get update

# Add a custom python library
RUN pip install --no-cache-dir requests

In command line, build image:

sudo docker build -t me/rasa-sdk:latest .

Edit docker-compose.override.yml:

services:
  action_server:
    image: **me/rasa-sdk:latest**
    volumes:
      - ./actions:/app/actions
    ports:
      - 5055:5055
    expose:
      - 5055

Good news is, I run sudo docker-compose up and get:

action_server_1    | 2020-01-29 21:11:16 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
action_server_1    | 2020-01-29 21:11:16 INFO     rasa_sdk.executor  - Registered function for 'action_joke'.

However, the problem shows up here when I test it:

app_1              | /app/rasa_sdk/utils.py:159: UserWarning: Your versions of rasa and rasa_sdk might not be compatible. You are currently running rasa version 1.6.1 and rasa_sdk version 1.5.1.
app_1              | To ensure compatibility use the same version for both, modulo the last number, i.e. using version A.B.x the numbers A and B should be identical for both rasa and rasa_sdk.
app_1              |   f"Your versions of rasa and "
app_1              | DEBUG:rasa_sdk.executor:Received request to run 'action_joke'
app_1              | ERROR:rasa_sdk.endpoint:No registered action found for name 'action_joke'.

Isn’t it strange that I explicitly mentioned v1.6.1 in my docker-compose.override.yml and it gives warning of incompatibility? Even more strange is it now says the action isn’t registered!!!

P.S. I’m using the action_joke from tutorials.

1 Like

In addition to all the above changes, I modified my default endpoints.yml:

action_endpoint:
  url: http://action_server:5055/webhook

Hopefully others will find this helpful!