Docker - Actions server not loading files (Is this a Bug)?

I have an odd situation.

I split up my actions files in an actions directory to help me keep things organized. I do still have an actions.py file with a handful of common classes:

  • actionRestarted
  • actionSlotReset
  • actionDefaultFallback
  • actionCreateIncident

If I rasa run actions I can see all of the form and custom actions spin up (20 total) in the log / on the screen.

However, if I launch the action server with a docker-compose.yml file entry like this

  action-server:
    container_name: rasa-action-server
    image: rasa/rasa-sdk:latest
    volumes:
      - ./actions:/app/actions
    ports:
      - "5055:5055"  

It only loads the initial 4 actions from my actions.py file. It does not load the rest of the form actions from my other files.

I DO have an __init.py__ file in there and it works because everything works perfectly when I launch it with rasa run actions

Any ideas why the rasa-sdk container won’t load the other files? It is acting as if it can’t tell the actions directory is setup as a package.

Jonathan,

We have a similar setup with the action code in the Sara rasa-demo bot here. Please compare your structure to this one.

Are you using the --actions option and what value are you passing?

Greg

Hi Greg,

I do have my actions directory setup like you do with Sara, although all of Sara’s custom and formActions seem to be listed in actions.py, while mine are not.

I don’t have a command: section in my docker-compose.yml file because it the action server starts up itself. Is there one you’d recommend?

I managed to modularize the files importing them on actions.py like any lib from python…