# Rasa Docker problem with training the model

**URL:** <https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558>\
**Category:** Rasa Open Source\
**Created:** [February 9, 2020, 4:12pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558 "2020-02-09T16:12:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 9, 2020, 4:12pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/1 "2020-02-09T16:12:27Z")

</div>

Hi,

I’m following this tutorial: [https://rasa.com/docs/rasa/user-guide/running-rasa-with-docker/](https://rasa.com/docs/rasa/user-guide/running-rasa-with-docker/)

I’ve done this lines:

docker run -v $(pwd):/app rasa/rasa init --no-prompt ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/2ae06a977ef9225dabd14bfb00830cdbf3dcba11.png)

docker run -it -v $(pwd):/app rasa/rasa shell

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/4563292f51f1436f19b92b463eef187514e99ac5.png)This one doesn’t wait for my input and finishes immediatly?

docker run \ -v $(pwd):/app \ rasa/rasa:latest-full \ train \ –domain domain.yml \ –data data \ –out models

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/521eb14e5646115ca48ebc90592b3c05cc252bc2.png)

Only this happens and new model doesn’t get trained/created?

Does anyone know why?

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 10, 2020, 6:52pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/2 "2020-02-10T18:52:04Z")

</div>

Anyone?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [February 14, 2020, 2:22pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/3 "2020-02-14T14:22:33Z")

</div>

If you are running the server with the third one

```auto
docker run \ -v $(pwd):/app \ rasa/rasa:latest-full \ train \ --domain domain.yml \ --data data \ --out models

```

and you are seeing the model not being trained, can you

```auto
docker exec -it <container> bash

```

and see if the model was created inside the container?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [February 14, 2020, 2:23pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/4 "2020-02-14T14:23:34Z")

</div>

Alternatively, can you try providing the full path to your project directory instead of $(pwd)?

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 14, 2020, 3:11pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/5 "2020-02-14T15:11:18Z")

</div>

[erohmensing](http://forum.rasa.com/u/erohmensing) I have tried now running this line from the image first and underneath is the result of 20 minutres training:

 ![error](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/4bc4b6b31b3906871480a46596ffa912ff5cf68a.png)

After this trained I entered the container with: "docker exec -it CONTAINTER\_NAME /bin/bash

and positioned myself into the model folder but there is **no new trained model** there…

Usually when I train locally my two last lines are underneath and they are missing after my initial training.

“2020-02-14 10:39:54 INFO rasa.nlu.model - Finished training component. 2020-02-14 10:39:55 INFO rasa.nlu.model - Successfully saved model into PATH”

Any ideas?

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 17, 2020, 8:16am UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/6 "2020-02-17T08:16:18Z")

</div>

Someone?

---

<div class="post-metadata">

**Author:** ![rimbns](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@rimbns](https://forum.rasa.com/u/rimbns)\
**Post date:** [February 18, 2020, 10:14am UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/7 "2020-02-18T10:14:45Z")

</div>

I’m having the same issue . No model found after running the command:

> docker run   
> -v $(pwd):/app   
> rasa/rasa:latest-full   
> train   
> –domain domain.yml   
> –data data   
> –out models So I tried to inspect what’s going on . I ran the container and tried to train it manually and Now I got a segmentation fault error.
> 
> ![segmentation-fault-docker](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/db3af58257ddc69848305deb74c77e48dd55071b.png)

the training hasn’t been completed , that’s why i couldn’t find the model and now i don’t know how to fix the issue ? any help is welcomed . thnx

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 18, 2020, 12:06pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/8 "2020-02-18T12:06:10Z")

</div>

I still haven’t solved this either…

[erohmensing](http://forum.rasa.com/u/erohmensing) [tyd](http://forum.rasa.com/u/tyd)

---

<div class="post-metadata">

**Author:** ![vivitare](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vivitare](https://forum.rasa.com/u/vivitare)\
**Post date:** [February 18, 2020, 9:27pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/9 "2020-02-18T21:27:15Z")

</div>

Hey, see this next topic :

> [@Odd problem of "rasa train" - Segmentation fault (core dumped)](http://forum.rasa.com/t/odd-problem-of-rasa-train-segmentation-fault-core-dumped/24695/4):
>
> Thanks, the post is very helpful and in time. For anyone run ubuntu 18.04 on AWS. Here is what works in Feb. 12 sudo apt update sudo apt install python3-dev python3-pip python3-venv python3 -m venv --system-site-packages ./venv-rasa source ./venv-rasa/bin/activate pip3 install -U pip pip3 install rasa pip3 uninstall gym pip3 install gym==0.15.4 pip3 uninstall sanic-plugins-framework pip3 install sanic-plugins-framework==0.8.2

---

<div class="post-metadata">

**Author:** ![rimbns](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@rimbns](https://forum.rasa.com/u/rimbns)\
**Post date:** [February 21, 2020, 1:23pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/10 "2020-02-21T13:23:47Z")

</div>

@vivitare thanks . it helped a lot to debug and understand the issue . At the end , I chose to build my image inspired from what I found on Rasa’s website and the community . For now everything is working perfectly and the containers are orchestrated . Here’s the link [Rim Ben Nasr / rasa docker · GitLab](https://gitlab.com/rim.bennasr/rasa-docker) . Hoping it could help someone else .

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [February 21, 2020, 3:58pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/11 "2020-02-21T15:58:59Z")

</div>

Thank you for sharing @rimbns but I get this error when I run your Dockerfile:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/586645b9eb7407e7d43c3a8f3e8d6fffefa73c70.png)

It is same one as I described here:

> [@Rasa Docker image from Github/rasa doesn't work on AWS EC2](http://forum.rasa.com/t/rasa-docker-image-from-github-rasa-doesnt-work-on-aws-ec2/25066/3):
>
> Hi @rasafan! Out of curiosity, have you looked into deploying [Docker-Compose Quick Install](https://rasa.com/docs/rasa-x/installation-and-setup/docker-compose-script/) or [Docker-Compose Manual Install](https://rasa.com/docs/rasa-x/installation-and-setup/docker-compose-manual/) that also comes with Rasa X? You can read about why [here](https://rasa.com/docs/rasa/user-guide/how-to-deploy/#deploying-your-rasa-assistant). Just to confirm, it looks like you are following [Rasa-Only Deployment with Docker Compose](https://rasa.com/docs/rasa/user-guide/how-to-deploy/#rasa-only-deployment-with-docker-compose), correct?

Can you help?

---

<div class="post-metadata">

**Author:** ![rimbns](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@rimbns](https://forum.rasa.com/u/rimbns)\
**Post date:** [February 25, 2020, 6:43pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/12 "2020-02-25T18:43:00Z")

</div>

Sorry rasafan for my very late reply , I’ve been busy last few days.

I didn’t run through this problem before and according to the internet they say that the errors occurred cause the apt repositories are configured incorrectly. So I guess the problem is coming from the base image (python:3.7). before running the Dockerfile , try to download the image

> sudo docker pull python:3.7

besides make sure that you are connected to internet while running the Dockerfile .

good luck

---

<div class="post-metadata">

**Author:** ![vsilent](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vsilent/32/25165_2.png) [@vsilent](https://forum.rasa.com/u/vsilent)\
**Post date:** [May 14, 2025, 12:54pm UTC](https://forum.rasa.com/t/rasa-docker-problem-with-training-the-model/24558/13 "2025-05-14T12:54:34Z")

</div>

I had the same problem until I fix the version in all yml files. Check if you have this notice: Training data file /app/data/rules.yml has a greater format version than your Rasa Open Source installation: 3.5 \> 3.1. Please consider updating to the latest version of Rasa Open Source.This file will be skipped.
