# Rasa Action Server

**URL:** <https://forum.rasa.com/t/rasa-action-server/59413>\
**Category:** Rasa Open Source\
**Created:** [August 21, 2023, 1:52pm UTC](https://forum.rasa.com/t/rasa-action-server/59413 "2023-08-21T13:52:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfcife](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/cfcife/32/23323_2.png) [@cfcife](https://forum.rasa.com/u/cfcife)\
**Post date:** [August 21, 2023, 1:52pm UTC](https://forum.rasa.com/t/rasa-action-server/59413/1 "2023-08-21T13:52:26Z")

</div>

I am trying to deploy a Rasa server and RASA action server and it fails with the error

```auto
2023-08-21 13:38:47 INFO rasa_sdk.endpoint - Starting action endpoint server...
2023-08-21 13:38:47 ERROR rasa_sdk.executor - Failed to register package 'actions'.
.
.
.
  File "/app/actions/botdb.py", line 4, in <module>
    from rasa.core.tracker_store import TrackerStore
ModuleNotFoundError: No module named 'rasa'

```

Content of my Docker Compose file

```auto
version: '3.0'
services:
  rasa:
    container_name: "rasa_server"
    user: root
    build:
      context: .
    volumes:
      - "./:/app"
    ports:
      - "5005:5005"

  action_server:
    image: rasa/rasa-sdk:latest
    restart: always
    volumes:
      - ./actions:/app/actions
    ports:
      - 5055

```

Also the rasa server is up and I can confirm through postman

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/3/d/3de236766d4bb73a120c996dd6b2645fb4d6872f.png)

Kindly confirm what I might be doing wrong. Also, there’s no DockerFile in the actions folder and this is directory structure of my project.

```auto
.
├── Dockerfile
├── README.md
├── actions
│ ├── __init__.py
│ ├── __pycache__
│ ├── actions.py
│ └── botdb.py
├── config.yml
├── credentials.yml
├── data
│ ├── nlu.yml
│ ├── rules.yml
│ └── stories.yml
├── docker-compose.yml
├── domain.yml
├── endpoints.yml
├── frontends
│ ├── Dockerfile
│ ├── index.html
│ └── static
├── graph.html
├── models
├── runrasa.sh
├── tests
  └── test_stories.yml

```

---

<div class="post-metadata">

**Author:** ![cfcife](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/cfcife/32/23323_2.png) [@cfcife](https://forum.rasa.com/u/cfcife)\
**Post date:** [August 22, 2023, 7:05am UTC](https://forum.rasa.com/t/rasa-action-server/59413/2 "2023-08-22T07:05:22Z")

</div>

Just to add further update. I stumbled on this article [Rasa Assistant Docker Compose] ([GitHub - cskujawa/rasa-assistant](https://github.com/cskujawa/rasa-assistant)) and modified my Docker Compose file and encountered the same error.

```auto
version: '3.7'
services:
  # app:
  # build: 
  # context: ./frontends
  # networks:
  # - admission-bot
  rasa:
    image: rasa/rasa:main-spacy-en
    container_name: rasa
    ports:
      - 5005:5005
    volumes:
      - .:/app
    command:
      - run
      - --debug
      - --enable-api
      - --cors
      - "*"
    networks:
      - admission-bot

  rasa-action_server:
    build:
      context: .
      dockerfile: ./actions/Dockerfile
    image: rasa-action_server
    container_name: rasa-action-server
    working_dir: /app
    command:
      - start
      - --debug
      - --actions
      - actions
      - --cors
      - "*"
    networks:
      - admission-bot
    ports:
      - 5055:5055
    volumes:
      - ./actions:/app/actions
    depends_on:
      - rasa

networks:
  admission-bot:
    name: admission-bot
    driver: bridge

```

RASA SERVER IS UP

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/a/9/a9094f0881501f323682a1c7ed1e1375159a72e9.png)

RASA ACTION SERVER

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/7/d/7d93cf4a54ed5e0dbc46e197750db573e2545a79.png)

---

<div class="post-metadata">

**Author:** ![xxxwarrior](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/xxxwarrior/32/22147_2.png) [@xxxwarrior](https://forum.rasa.com/u/xxxwarrior)\
**Post date:** [August 22, 2023, 9:23am UTC](https://forum.rasa.com/t/rasa-action-server/59413/3 "2023-08-22T09:23:20Z")

</div>

Hello!

I’m not quite proficient in rasa but I’ll tell you what I think.

The error seems to be related to the missing package when you run container inside of docker. As far as I can see (I might be wrong) rasa.core is a part of rasa not rasa\_sdk. I’m not sure how to resolve the issue though but maybe you need to install dependencies while building the containers.

In your original post you say that there’s no Dockerfile for actions, but in your modified docker-compose it looks like there’s a Dockerfile for action server.

Could you maybe share the contents of your Dockerfiles?

---

<div class="post-metadata">

**Author:** ![cfcife](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/cfcife/32/23323_2.png) [@cfcife](https://forum.rasa.com/u/cfcife)\
**Post date:** [August 22, 2023, 9:31am UTC](https://forum.rasa.com/t/rasa-action-server/59413/4 "2023-08-22T09:31:43Z")

</div>

Thanks for the reply @xxxwarrior . This is the `action-server` dockerfile

```auto
# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:3.3.0

# Change back to root user to install dependencies
USER root

# To install packages from PyPI
RUN pip install --no-cache-dir requests

# Switch back to non-root to run code
USER $user

```

---

<div class="post-metadata">

**Author:** ![xxxwarrior](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/xxxwarrior/32/22147_2.png) [@xxxwarrior](https://forum.rasa.com/u/xxxwarrior)\
**Post date:** [August 22, 2023, 10:30am UTC](https://forum.rasa.com/t/rasa-action-server/59413/5 "2023-08-22T10:30:05Z")

</div>

I’m not sure how to resolve your issue, for the sake of testing I would maybe try to install rasa package like you install requests there and see if it changes anything.

---

<div class="post-metadata">

**Author:** ![cfcife](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/cfcife/32/23323_2.png) [@cfcife](https://forum.rasa.com/u/cfcife)\
**Post date:** [August 22, 2023, 11:19am UTC](https://forum.rasa.com/t/rasa-action-server/59413/6 "2023-08-22T11:19:07Z")

</div>

Wow. That solved the issue.

Thank you. Its quite weird rasa is not installed in that sdk version

---

<div class="post-metadata">

**Author:** ![xxxwarrior](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/xxxwarrior/32/22147_2.png) [@xxxwarrior](https://forum.rasa.com/u/xxxwarrior)\
**Post date:** [August 22, 2023, 12:23pm UTC](https://forum.rasa.com/t/rasa-action-server/59413/7 "2023-08-22T12:23:31Z")

</div>

Glad that helped!
