Unable to deploy the Rasa Chatbot

FROM rasa/rasa:3.6.2-full

USER root

WORKDIR /app

COPY . /app

RUN rasa train

Set environment variable to silence SQLAlchemy warning

ENV SQLALCHEMY_SILENCE_UBER_WARNING=1

Set environment variable for the port

ENV PORT 10000

USER 1001

Expose the port on which Rasa will run

EXPOSE $PORT

Start Rasa server

CMD [“rasa”, “run”, “–enable-api”, “–cors”, “*”, “–port”, “$PORT”]

Error message:

rasa: error: argument {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x,evaluate}: invalid choice: '/bin/bash' (choose from 'init', 'run', 'shell', 'train', 'interactive', 'telemetry', 'test', 'visualize', 'data', 'export', 'x', 'evaluate')

Additional error information:

Copy

Oct 2 09:00:29 AM**==> Exited with status 2**
Oct 2 09:00:29 AM**==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys**
Oct 2 09:00:35 AMusage: rasa [-h] [--version]
Oct 2 09:00:35 AM {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x,evaluate}
Oct 2 09:00:35 AM ...

This problem persists even after trying various formats for the CMD instruction, including:

  1. Using shell form: CMD rasa run --enable-api --port $PORT --cors "*" --debug
  2. Using exec form: CMD ["rasa", "run", "--enable-api", "--port", "$PORT", "--cors", "*", "--debug"]

Are you importing rasa 3.6.2 or 3.6.20? Maybe that “0” fixes the error :thinking:

FROM rasa/rasa:3.6.2-full VS FROM rasa/rasa:3.6.20-full

I had a similar error, I solved it by setting the ENTRYPOINT to [“rasa”] after the COPY ./app

(…)

USER 1001

COPY …/ /app

WORKDIR /app

ENTRYPOINT [“rasa”]

(…)

Then, in the dockercompose I´m running the command

services:
  rasa_server:
    container_name: xxx-rasa
    platform: linux/amd64
    build:
      context: ../
      dockerfile: docker/Dockerfile.rasa
    ports:
      - "5005:5005"
    env_file:
      - .env-docker
    volumes:
      - ./:/app
    command: ["run", "--cors", "*", "--debug", "--endpoints", "endpoints.yml"]

If that doesn´t work, u can run “docker inspect nameofservice” and see what is the command being run, that helped me a lot to find the source :slight_smile: