Rasa: can not pass arguments in docker-compose up

Created on 26 May 2019  路  3Comments  路  Source: RasaHQ/rasa

Rasa version:
rasa x
Python version:
3.6
Operating system (windows, osx, ...):
ubuntu
Issue:
the docker run versions work fine for example

docker run \
  -v $(pwd)/models:/app/models \
  -v $(pwd)/actions:/app/actions \
  -p 6005:6005 \
  rasa/rasa:latest-full \
  run \
  --endpoints endpoints.yml \
  --enable-api \
  --log-file out.log \
  --port 6005

But if try this in docker compose file and do docker-compuse up, it gives an error, here is my docker compose file

Content of configuration file (docker-compose.yml):

version: '3.0'
services:
  rasa:
    image: rasa/rasa:latest-full
    ports:
      - 6005:6005
    volumes:
      - ./:/app
    command:
      - run
      - --endpoints endpoints.yml 
      - --debug 
      - --enable-api 
      - -p 6005
 action_server:
    image: rasa/rasa_sdk:latest
    volumes:
      - ./actions:/app/actions

and the error message

action_server_1  | 2019-05-26 03:44:18 INFO     rasa_sdk.endpoint  - Action endpoint is up and running. on ('0.0.0.0', 5055)
rasa_1           | usage: rasa run [-h] [-v] [-vv] [--quiet] [-m MODEL] [--log-file LOG_FILE]
rasa_1           |                 [--endpoints ENDPOINTS] [-p PORT] [-t AUTH_TOKEN]
rasa_1           |                 [--cors [CORS [CORS ...]]] [--enable-api]
rasa_1           |                 [--remote-storage REMOTE_STORAGE] [--credentials CREDENTIALS]
rasa_1           |                 [--connector CONNECTOR] [--jwt-secret JWT_SECRET]
rasa_1           |                 [--jwt-method JWT_METHOD]
rasa_1           |                 {actions} ... [model-as-positional-argument]
rasa_1           | rasa run: error: invalid choice: '--endpoints endpoints.yml' (choose from 'actions')

Content of domain file (domain.yml) (if used & relevant):


Most helpful comment

Can you try formatting it like this instead?

command: >
    run
    --endpoints endpoints.yml 
    --debug 
    --enable-api 
    -p 6005

All 3 comments

Can you try formatting it like this instead?

command: >
    run
    --endpoints endpoints.yml 
    --debug 
    --enable-api 
    -p 6005

Works, very interesting, why does that solve the problem?

just a matter of formatting in the docker compose yaml :D

Was this page helpful?
0 / 5 - 0 ratings