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:
- Using shell form:
CMD rasa run --enable-api --port $PORT --cors "*" --debug
- Using exec form:
CMD ["rasa", "run", "--enable-api", "--port", "$PORT", "--cors", "*", "--debug"]