How to use Docker with remote storage - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

👋 Introducing the Rasa Playground

How to use Docker with remote storage

post by felaray on Aug 11, 2019

I am a newbie and already know how RASA works. But I want to use a container with Azure remote storage, but it doesn’t work.

I added environment variables to the dockerfile and built the image.

============= dockerfile =====================

# Extend the official Rasa SDK image

FROM rasa/rasa:latest

# Add a custom system library (e.g. git)

RUN apt-get update && \
    apt-get install -y git

# Add a custom python library (e.g. jupyter)

RUN pip install jieba

RUN pip install azure-storage-blob

# ENV for remote

ENV AZURE_CONTAINER=rasa
ENV AZURE_ACCOUNT_NAME=name
ENV AZURE_ACCOUNT_KEY=key

====================== command ==========================

docker run felaray/rasazhtw:5 run -m nlu-20190808-072018.tar.gz --remote-storage azure

======================= log file =========================

2019-08-12 10:47:40,374 [INFO ] Starting Rasa server on [http://localhost:5005](http://localhost:5005/)
2019-08-12 10:47:40,485 [ERROR] Could not load model due to You need to provide an account name and either an account_key or sas_token when creating a storage service...
2019-08-12 10:47:40,492 [ERROR] Experienced exception while trying to serve
Traceback (most recent call last):
  File “c:\program files\python37\lib\site-packages\sanic\app.py”, line 1096, in run
    serve(**server_settings)
  File “c:\program files\python37\lib\site-packages\sanic\server.py”, line 742, in serve
    trigger_events(before_start, loop)
  File “c:\program files\python37\lib\site-packages\sanic\server.py”, line 604, in trigger_events
    loop.run_until_complete(result)
  File “c:\program files\python37\lib\site-packages\sanic\app.py”, line 1347, in load_agent_on_start
    action_endpoint=endpoints.action,
  File “c:\program files\python37\lib\site-packages\rasa\core\agent.py”, line 253, in load_agent
    model_server=model_server,
  File “c:\program files\python37\lib\site-packages\rasa\core\agent.py”, line 939, in load_from_remote_storage
    persistor = get_persistor(remote_storage)
  File “c:\program files\python37\lib\site-packages\rasa\nlu\persistor.py”, line 28, in get_persistor
    os.environ.get(“AZURE_ACCOUNT_KEY”),
  File “c:\program files\python37\lib\site-packages\rasa\nlu\persistor.py”, line 226, in __init__
    endpoint_suffix=“ [core.windows.net](http://core.windows.net/)”,
  File “C:\Users\vivat\AppData\Roaming\Python\Python37\site-packages\azure\storage\blob\blockblobservice.py”, line 150, in __init__
    custom_domain, request_session, connection_string, socket_timeout, token_credential)
  File “C:\Users\vivat\AppData\Roaming\Python\Python37\site-packages\azure\storage\blob\baseblobservice.py”, line 213, in __init__
    socket_timeout=socket_timeout)
  File “C:\Users\vivat\AppData\Roaming\Python\Python37\site-packages\azure\storage\common_connection.py”, line 126, in get_service_parameters
    raise ValueError(_ERROR_STORAGE_MISSING_INFO)
ValueError: You need to provide an account name and either an account_key or sas_token when creating a storage service.

=================================================

I have tried it for two days, please help me if you can. thx!