Docker-compose train cmd failure

Hi I’m composing a docker-compose file for the following purpose…

  1. Dockerize Rasa server as a standalone container.
  2. Expose necessary ports with default NLP pipeline configurations.

Here is my docker-compose file:

version: '3.0' 
        container_name: rasa_server
        image: rasa/rasa:latest-full
            - "5005:5005"
            - "./:/app"
            - "./models:/app/models"
            - "./:/app/config"
            - "./data:/app/data"
            -  run

So the docker-compose up cmd, constructs a rasa server using the already pre trained model present in the models directory. when there’s no model present, the cmd fails to start the rasa server.

So i need a cmd to train the rasa engine using the data provided in the directories… Can anyone help me out?

hey @nirmal_mahen welcome to the Rasa community!

Have you seen this guide? It should contain step by step instructions for what you’re looking for.

Following that guide, you’ll be able to train the model using a command like this:

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

Thanks for the reply @desmarchris, The guide is useful when creating and depolying rasa using cmd, I need a docker-compose.yml, So when i run docker compose up, the rasa should train initially and start.