neilenns / node-deepstackai-trigger

Detects motion using Deepstack AI and calls registered triggers based on trigger rules.
MIT License
165 stars 28 forks source link

docker-compose parsing error #403

Closed stats2909 closed 3 years ago

stats2909 commented 3 years ago

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

Have you tried with the sample files?

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

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

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
neilenns commented 3 years ago

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.

stats2909 commented 3 years ago

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

neilenns commented 3 years ago

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.