Hello everyone. I have a very simple Docker script for my chatbot (I am relatively new to Docker). So far everything has been working great and I deployed it successfully to a server. However, I need the integrated version control feature of rasa x so my customer can train her model on production. For that, I need to run rasa x in production mode (rasa x --production). This doesn’t work however. rasa runs fine on port 5005 but rasax is not available at all (nothing running on port 5002). This guy had the same issue: http://forum.rasa.com/t/rasa-x-production-command-is-not-loading-ui/26920
Here are my Docker and Compose files:
docker-compose
services:
rasa:
container_name: rasax
build: .
networks: [ 'rasa-network' ]
ports:
- "5005:5005"
- "5002:5002"
working_dir: /root
volumes:
- ./:/root:cached
environment:
- RASA_X_PASSWORD=${RASA_X_PASSWORD}
- RASA_TOKEN=${RASA_TOKEN}
- PASSWORD_SALT=${PASSWORD_SALT}
- JWT_SECRET=${JWT_SECRET}
#FOR PRODUCTION, ADD THIS TAG: --production
command: rasa x --production --no-prompt --enable-api --endpoints endpoints.yml --port 5005 --cors "*" --debug --log-file LOG_FILE
action_server:
image: rasa/rasa-sdk:latest
networks: [ 'rasa-network' ]
ports:
- "5055:5055"
volumes:
- "./actions:/app/actions"
networks: { rasa-network: { } }
Dockerfile
# FROM registry.gitlab.com/youengineering/intern/craftcms/craft-shared/build:latest
FROM python:3.8
# install dependencies
WORKDIR /root
RUN python -m pip install --upgrade pip==20.2
COPY requirements.txt .
RUN pip install -r requirements.txt
# install nlp model spacy
RUN pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
RUN pip install --default-timeout=1800 "https://github.com/explosion/spacy-models/releases/download/de_dep_news_trf-3.0.0/de_dep_news_trf-3.0.0-py3-none-any.whl"
# expose port for rasa server
EXPOSE 5005
# expose port for rasa X server
EXPOSE 5002
# expose port for ssh
EXPOSE 22
EXPOSE 443
EXPOSE 80
The only thing I spotted in the logs is the warning
Agent could not be loaded with the provided configuration. Load default agent without any model.
What am I missing? Is it looking for a model with a production tag on a production server?
Here are the full logs:
docker compose up
[+] Running 2/2
⠿ Container ip5-auxilio-rasa_action_server_1 Started 2.2s
⠿ Container rasax Started 2.1s
Attaching to action_server_1, rasax
action_server_1 | 2021-08-17 19:36:20 INFO rasa_sdk.endpoint - Starting action endpoint server...
action_server_1 | 2021-08-17 19:36:20 INFO rasa_sdk.executor - Registered function for 'action_show_time'.
action_server_1 | 2021-08-17 19:36:20 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055
rasax | Starting Rasa X in production mode... 🚀
rasax | 2021-08-17 19:36:26 DEBUG matplotlib - (private) matplotlib data path: /usr/local/lib/python3.8/site-packages/matplotlib/mpl-data
rasax | 2021-08-17 19:36:26 DEBUG matplotlib - matplotlib data path: /usr/local/lib/python3.8/site-packages/matplotlib/mpl-data
rasax | 2021-08-17 19:36:27 DEBUG matplotlib - CONFIGDIR=/root/.config/matplotlib
rasax | 2021-08-17 19:36:27 DEBUG matplotlib - matplotlib version 3.3.4
rasax | 2021-08-17 19:36:27 DEBUG matplotlib - interactive is False
rasax | 2021-08-17 19:36:27 DEBUG matplotlib - platform is linux
rasax | 2021-08-17 19:36:27 DEBUG rasa.cli.utils - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
rasax | 2021-08-17 19:36:27 DEBUG rasa.core.utils - Available web server routes:
rasax | /conversations/<conversation_id:path>/messages POST add_message
rasax | /conversations/<conversation_id:path>/tracker/events POST append_events
rasax | /webhooks/rasa GET custom_webhook_RasaChatInput.health
rasax | /webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive
rasax | /webhooks/rest GET custom_webhook_RestInput.health
rasax | /webhooks/rest/webhook POST custom_webhook_RestInput.receive
rasax | /model/test/intents POST evaluate_intents
rasax | /model/test/stories POST evaluate_stories
rasax | /conversations/<conversation_id:path>/execute POST execute_action
rasax | /domain GET get_domain
rasax | /socket.io POST handle_request
rasax | / GET hello
rasax | /model PUT load_model
rasax | /model/parse POST parse
rasax | /conversations/<conversation_id:path>/predict POST predict
rasax | /conversations/<conversation_id:path>/tracker/events PUT replace_events
rasax | /conversations/<conversation_id:path>/story GET retrieve_story
rasax | /conversations/<conversation_id:path>/tracker GET retrieve_tracker
rasax | /webhooks/socketio GET socketio_webhook.health
rasax | /status GET status
rasax | /model/predict POST tracker_predict
rasax | /model/train POST train
rasax | /conversations/<conversation_id:path>/trigger_intent POST trigger_intent
rasax | /model DELETE unload_model
rasax | /version GET version
rasax | 2021-08-17 19:36:27 INFO root - Starting Rasa server on http://localhost:5005
rasax | 2021-08-17 19:36:27 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
rasax | 2021-08-17 19:36:27 DEBUG urllib3.connectionpool - Starting new HTTPS connection (1): api.segment.io:443
rasax | 2021-08-17 19:36:28 DEBUG urllib3.connectionpool - https://api.segment.io:443 "POST /v1/track HTTP/1.1" 200 21
rasax | 2021-08-17 19:36:28 INFO root - Enabling coroutine debugging. Loop id 94535023215920.
rasax | 2021-08-17 19:36:28 DEBUG root - Could not load interpreter from 'None'.
rasax | 2021-08-17 19:36:28 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.
rasax | 2021-08-17 19:36:28 DEBUG rasa.core.lock_store - Connected to lock store 'InMemoryLockStore'.
rasax | /usr/local/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: No valid configuration given to load agent.
rasax | /usr/local/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: Agent could not be loaded with the provided configuration. Load default agent without any model.
rasax | 2021-08-17 19:36:28 DEBUG rasa.core.nlg.generator - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
rasax | 2021-08-17 19:36:28 INFO root - Rasa server is up and running.