# Rasa chatbot behaves weirdly on docker, works perfectly on local

**URL:** <https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565>\
**Category:** Rasa Open Source\
**Created:** [December 19, 2023, 7:21pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565 "2023-12-19T19:21:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ameybot](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ameybot/32/23735_2.png) [@Ameybot](https://forum.rasa.com/u/Ameybot)\
**Post date:** [December 19, 2023, 7:21pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/1 "2023-12-19T19:21:05Z")

</div>

My rasa chatbot works fine on my local machine. My rasa version is:

```auto
Rasa Version : 3.6.15
Minimum Compatible Version: 3.5.0
Rasa SDK Version : 3.6.2
Python Version : 3.9.18
Operating System : macOS-14.1.1-arm64-arm-64bit

```

My directory structure is:

```auto
.
├── Dockerfile
├── config.yml
├── credentials.yml
├── data
│ ├── nlu.yml
│ ├── rules.yml
│ └── stories.yml
├── domain.yml
├── endpoints.yml
└── models
    └── 20231219-234027-gray-entropy.tar.gz

```

My docker file is:

```auto
# Use an official Rasa image as a base image
FROM python:3.9.18

# Set the working directory
WORKDIR /app/rasa

# Copy the contents of the current directory to the container
COPY . .

RUN pip install rasa==3.6.15

# Specify the command to run when the container starts
CMD ["rasa","run", "--enable-api", "--cors", "*", "--debug"]

```

But whenever i dockerize my app it shows the log:

_DEBUG rasa.core.policies.ted\_policy - Failed to load ABCMeta from model storage. Resource ‘train\_TEDPolicy3’ doesn’t exist._

_DEBUG root - No model server endpoint found after server start._

_INFO root - Enabling coroutine debugging. Loop id 187650336839136._

(just few logs which i found confusing)

Mind you, the shell works, but it only gives default fallback responses.

* * *

**Edit1:**

When I try to run the same configuration locally:

```auto
conda create -n rasa3 python=3.9.18 ipython

pip install rasa==3.6.15

```

everything works fine. The rasa shell works as it should. The default response does not get triggered. Is there a problem with my docker python image?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [December 20, 2023, 5:35pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/6 "2023-12-20T17:35:22Z")

</div>

@Ameybot where is your requirements.txt file in the docker ?

Check some of my post related to docker and docker compose maybe it will help you.

---

<div class="post-metadata">

**Author:** ![Ameybot](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ameybot/32/23735_2.png) [@Ameybot](https://forum.rasa.com/u/Ameybot)\
**Post date:** [December 20, 2023, 5:52pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/7 "2023-12-20T17:52:23Z")

</div>

There is no requirements.txt required in my case. Therefore I don’t have it.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [December 21, 2023, 5:01pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/8 "2023-12-21T17:01:16Z")

</div>

@Ameybot share your domain.yml or are you using action server to ?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [December 21, 2023, 5:05pm UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/9 "2023-12-21T17:05:46Z")

</div>

@Ameybot

Check this link and mate the necessary changes in your Dockerfile only and build your model.

You need to check rasa train, image for rasha and the cmd command

> [@Dockerizing my rasa chatbot application that has botfront](https://forum.rasa.com/t/dockerizing-my-rasa-chatbot-application-that-has-botfront/46096/11):
>
> @mangesh Please find the steps as per our discussion: For Wordpress: For creating a docker image for Wordpress site for deployment purpose only; running on localhost 8000 [Quick Wordpress Setup With Docker - YouTube](https://youtu.be/pYhLEV-sRpY) Deploying rasa on Wordpress site please follow this link [DEPLOY RASA CHATBOT TO WORDPRESS WEBSITE | WORDPRESS | INNOVATE YOURSELF - YouTube](https://youtu.be/J5O9JTCveQc) For Docker Environment: Create the Dockerhub ID from [https://hub.docker.com](https://hub.docker.com) Create a Docker image for action server by the name Dock…

Let me know

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [December 24, 2023, 6:20am UTC](https://forum.rasa.com/t/rasa-chatbot-behaves-weirdly-on-docker-works-perfectly-on-local/60565/10 "2023-12-24T06:20:53Z")

</div>

I assume you are expecting the model to be copied into the image but Rasa isn’t finding it. Confirm that you have a model in the models directory before building the docker image. You can also use `dive` to look at the image file system to confirm that the model is in the models directory.
