neilenns / node-deepstackai-trigger

Detects motion using Deepstack AI and calls registered triggers based on trigger rules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose parsing error

stats2909 opened this issue · comments

Hi - I'm having issues getting the docker container set up

  • I have docker installed (and successfully got deepstack running as a stand-alone container - removing it had no impact on the error I'm having)
  • I have copied the sample config files to a new directory /Volumes/DATA/Raw_files and updated with my specifics
  • I used terminal and navigate to the Raw_Files folder with the config files in it and run "docker-compose up"
  • I am then receiving a yaml parsing error. I've tried to spot errors and used http://yaml-online-parser.appspot.com/ which is reporting no errors with the docker-compase.yml file.
  • I tried using the sample yaml file and ended up getting the same error message.
  • Apologies in advance if I've done something stupid!

Have you tried with the sample files?

  • [Yes - error is the same]

Have you tried the steps in the troubleshooting guide?
https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Troubleshooting

  • [Yes - nothing there to help, and have looked all over - but I'm a bit of a newbie at this!]

Log entries
This is the error I am receiving:

Admin@Plex Raw_files % docker-compose up
ERROR: yaml.parser.ParserError: while parsing a flow mapping
in "./docker-compose.yml", line 1, column 1
expected ',' or '}', but got '{'
in "./docker-compose.yml", line 2, column 34

Installation details

  • OS: Mac OS 10.15.2
  • Docker setup: Docker version 19.03.13, build 4484c46d9d

docker-compose.yml below

version: "3.8"
services:
  trigger:
    volumes:
      # Change d:/myfolder/myimages to point to the folder that will have the images
      # to analyze. Only change the local path that is before the :/aiinput portion.
      # Don't change the :/aiinput part. For example, if you are on Windows and your
      # images are stored locally in d:/blueiris/capturedImages your final line should
      # look like this:
      # d:/blueIris/capturedImages:/aiinput
      - /Volumes/DATA:/aiinput

    environment:
      # Change this to match the timezone the images are produced in,
      # Typically this will be the timezone of the machine running
      # the Docker container. For a list of valid timezone values
      # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
      # The value to use is in the "TZ database name" column.
      - TZ=Europe/London

    ports:
      # This port is used by the local web server when annotated images are enabled.
      # If you change the port used by the local web server in the settings.json file
      # this also has to change to match.
      - 4242:4242

    # ------------------------------------------------------------------------
    # Don't change anything below this line unless you know what you are doing
    secrets:
      - triggers
      - settings
    image: danecreekphotography/node-deepstackai-trigger:latest
    restart: always
    depends_on:
      - deepstack-ai

  deepstack-ai:
    image: deepquestai/deepstack:latest
    restart: always
    volumes:
      - localstorage:/datastore
    environment:
      - VISION-DETECTION=True

volumes:
  localstorage:

secrets:
  settings:
    # This should point to the location of the settings.json configuration file
    file: ./settings.json
  triggers:
    # This should point to the location of the triggers.json configuration file
    file: ./triggers.json

That really sounds like your docker-compose.yml file isn't formatted properly. I know you pasted in the contents and it looks fine, but can you zip up the actual file and attach it to this issue?

Also try running docker-compose.yml -f ./docker-compose.yml up to see if explicitly specifying the file makes a difference.

I tried running the command you suggested -it did't work (zsh: command not found: docker-compose.yml) so I adapted it to the following

docker-compose -f ./docker-compose.yml up

but still got a very similar error:

ERROR: yaml.parser.ParserError: while parsing a flow mapping
in "././docker-compose.yml", line 1, column 1
expected ',' or '}', but got '{'
in "././docker-compose.yml", line 2, column 34

I notice the file location is now "././docker-compose.yml", is this a file/execution path issue?

File should be attached - thanks for a quick response 👍

docker-compose.yml.zip

M

Your docker-compose.yml file isn't a plain txt file. It looks like it was edited/opened in some sort of rich text editor. This is what the first part of the file is:

{\rtf1\ansi\ansicpg1252\cocoartf2511
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fmodern\fcharset0 Courier;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}
\paperw11900\paperh16840\margl1440\margr1440\vieww18760\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\sl280\partightenfactor0

\f0\fs24 \cf2 \expnd0\expndtw0\kerning0
version: \'933.8\'94\

The file needs to be a plain text file.