Rasa X with Docker is Read Only

I’m running Rasa X from Docker Compose and the web interface opens with no problem. But when I try to start training a model, even as simple as adding a sentence, it won’t save. Rasa X web interface is running as if its read only.

Here’s my docker-compose.yml

version: '3'
services:
  rasa-x:
    image: rasa/rasa-x:latest
    expose:
      - 5002
      - 5005
    ports:
      - 5002:5002
      - 5005:5005
    volumes:
      - //c/docker/models:/etc/rasa/models
      - //c/docker/environments.yml:/etc/rasa/environments.yml
      - //c/docker/credentials.yml:/etc/rasa/credentials.yml
      - //c/docker/endpoints.yml:/etc/rasa/endpoints.yml
      - //c/docker/auth:/etc/rasa/auth
      - //c/docker/logs:/etc/rasa/logs
    environment:
      - RASA_X_PASSWORD=mypassword

The only errors I see on the command line are when I try using Rasa X web interface…

rasa-x_1  | WARNING:rasax.community.services.settings_service:Could not inject deployment environments configuration from file 'environments.yml'. Details:
rasa-x_1  | File 'environments.yml' does not exist.
rasa-x_1  | You may still use Rasa X if you currently have a working configuration. Your current configuration is:
rasa-x_1  | {
rasa-x_1  |   "environments": {
rasa-x_1  |     "rasa": {}
rasa-x_1  |   }
rasa-x_1  | }
rasa-x_1  | Starting Rasa X server... 🚀
rasa-x_1  | /usr/local/lib/python3.6/site-packages/rasax/community/server.py:65: RuntimeWarning: coroutine 'ModelService.mark_latest_as_production' was never awaited
rasa-x_1  |   model_service.mark_latest_as_production()
rasa-x_1  | Exception occurred while handling uri: 'http://localhost:5002/api/projects/default/logs?q=hi'
rasa-x_1  | Traceback (most recent call last):
rasa-x_1  |   File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 944, in handle_request
rasa-x_1  |     response = await response
rasa-x_1  |   File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 177, in decorated_function
rasa-x_1  |     return await await_and_return_response(args, kwargs, request)
rasa-x_1  |   File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 107, in await_and_return_response
rasa-x_1  |     response = await response
rasa-x_1  |   File "/usr/local/lib/python3.6/site-packages/rasax/community/api/blueprints/nlu.py", line 150, in add_log
rasa-x_1  |     request, project_id, query
rasa-x_1  |   File "/usr/local/lib/python3.6/site-packages/rasax/community/api/blueprints/nlu.py", line 68, in _create_message_log_from_query
rasa-x_1  |     stack_service_has_model = await stack_service.has_active_model()
rasa-x_1  | AttributeError: 'NoneType' object has no attribute 'has_active_model'

I appreciate any help. Thanks, Jason

I get the same read only issue when I run Rasa X from Docker without compose.

docker run -it -p 5002:5002 -p 5005:5005 -v /c/docker/models:/etc/rasa/models -v //c/docker/environments.yml:/etc/rasa/environments.yml -v //c/docker/credentials.yml:/etc/rasa/credentials.yml -v //c/docker/endpoints.yml:/etc/rasa/endpoints.yml -v //c/docker/auth:/etc/rasa/auth -v //c/docker/logs:/etc/rasa/logs rasa/rasa-x

Even the simplest way I can think of to run Rasa X in Docker still runs only as read only. Am I writing something wrong or is there a problem with the latest rasa/rasa-x image in Docker Hub.

docker run -it -p 5002:5002 rasa/rasa-x

Hi @jwhitmer,

Thanks for your question! Rasa X is not designed to run as a standalone service. It needs a range of other services, like rasa, rabbitMQ, a database etc. Please follow the Deploy to a Server installation instructions. You’ll automatically get the full docker-compose file and will be able to run Rasa X on docker.

I hope that helps!

Thank you @ricwo. I had made an assumption that the rasa-x docker container included everything to run. Your explanation makes sense why its not running.

Unfortunately while trying to follow the server installation instructions, I’m on Windows, so I can’t run .sh commands and the command line doesn’t know what most of those command lines are. I’m basically dead-in-the-water.

I always liked that Rasa had a low barrier to entry. Just 2 lines to get it up and running, and I’m talking to a demo chatbot.

docker run -v //c/docker/app:/app rasa/rasa init --no-prompt
docker run -it -v //c/docker/app:/app rasa/rasa shell

Rasa X is a great interface and looked like it would make the barrier to entry even easier. But it seems like it raised the barrier beyond what can be accomplished on a Windows computer. I’m still hopeful that I can get Rasa X running in docker from my pc.

Your explanation helped me expand my docker-compose.yml file. But I’m sure I’m missing some configuration, especially around the non-Rasa containers of RabbitMQ and Postgres.

Is there a zip folder with a properly configured docker-compose.yml and all the local files needed to run a simple demo in Rasa X? Something that can be started with just “docker-compose up” to keep the barrier to entry low?

Thank you, Jason

Here is the docker-compose.yml that I’m currently using…

version: '3.4'

services:
  rasa-production:
    image: rasa/rasa:latest-full
    networks: ['rasa-network']
    ports:
    - "5005:5005" # socket.io connection
    volumes:
    - "//c/docker/credentials.yml:/app/credentials.yml"
    - "//c/docker/endpoints.yml:/app/endpoints.yml"
    command:
    - run

  rasa-worker:
    image: rasa/rasa:latest-full
    networks: ['rasa-network']
    volumes:
    - "//c/docker/credentials.yml:/app/credentials.yml"
    - "//c/docker/endpoints.yml:/app/endpoints.yml"
    command:
    - run

  rasa-x:
    image: rasa/rasa-x:latest
    networks: ['rasa-network']
    ports:
    - "5002:5002" # user interface http://localhost:5002/login?username=me&password=mypassword
    volumes:
    - "//c/docker/models:/app/models" # models
    - "//c/docker/environments.yml:/app/environments.yml" # environments.yml
    - "//c/docker/logs:/logs" # logs
    - "//c/docker/auth:/app/auths"
    environment:
      - RASA_X_PASSWORD=mypassword

  app:
    image: rasa/rasa-x-demo:latest  # not using rasa/rasa-sdk:latest
    networks: ['rasa-network']
    ports:
    - "5055:5055" # action server
    volumes:
    - "//c/docker/actions:/app/actions"

  rabbit:
    image: bitnami/rabbitmq:3.7.17
    networks: ['rasa-network']
    ports:
    - "5672:5672" # rabbitmq

  db:
    image: bitnami/postgresql:11.2.0
    networks: ['rasa-network']
    ports:
    - "5432:5432" # postgres database
    volumes:
    - "//c/docker/db:/bitnami/postgresql" # postgres database

  duckling:
    image: rasa/duckling:latest
    networks: ['rasa-network']
    ports:
    - "8000:8000" # duckling

  nginx:
    image: rasa/nginx:latest
    networks: ['rasa-network']
    ports:
    - "80:80" # nginx
    - "443:443" # nginx
    volumes:
    - "//c/docker/certs:/opt/bitnami/certs" # certs
    - "//c/docker/terms:/opt/bitnami/nginx/conf/bitnami/terms"

  logger:
    image: rasa/logger:latest
    networks: ['rasa-network']
    volumes:
    - "//c/docker/logs:/logs" # logs
    - "//c/docker/.env/:/etc/rasa/.env"
    - "//c/docker/docker-compose.yml:/etc/rasa/docker-compose.yml"
    - "//c/docker/var/run/docker.sock:/var/run/docker.sock"
  
networks: {rasa-network: {}}

Hi @jwhitmer, the auto-install script only runs on Unix-like operating systems. You can however follow our manual instructions. To answer your question, section 3 in fact contains download instructions for the docker-compose.yml:

$ wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/stable/docker-compose.ce.yml

I hope that helps, and let us know how it goes!