From ec1a8ebd4a0bbca53a03d67d7ddc3ccf88e5a09d Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Mon, 9 Nov 2020 07:30:44 -0600 Subject: [PATCH] fixes --- docker/Dockerfile.base | 4 +--- frigate/app.py | 3 ++- frigate/config.py | 7 +------ nginx/nginx.conf | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 4ac01783d..0d6cd9855 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -20,7 +20,7 @@ RUN apt-get -qq update \ python3-pip \ && pip3 install -U /wheels/*.whl \ && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \ - && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \ + && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-unstable main" > /etc/apt/sources.list.d/coral-edgetpu.list \ && echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \ && apt-get -qq update && apt-get -qq install --no-install-recommends -y \ libedgetpu1-max=15.0 \ @@ -39,8 +39,6 @@ COPY labelmap.txt /labelmap.txt RUN wget -q https://github.com/google-coral/edgetpu/raw/$MODEL_REFS/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite -O /edgetpu_model.tflite RUN wget -q https://github.com/google-coral/edgetpu/raw/$MODEL_REFS/test_data/ssd_mobilenet_v2_coco_quant_postprocess.tflite -O /cpu_model.tflite -RUN mkdir /cache /clips - WORKDIR /opt/frigate/ ADD frigate frigate/ diff --git a/frigate/app.py b/frigate/app.py index 82169f81a..4b0748a41 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -121,6 +121,7 @@ class FrigateApp(): def start(self): self.init_logger() + # TODO: exit if config doesnt parse self.init_config() self.init_queues() self.init_database() @@ -132,7 +133,7 @@ class FrigateApp(): self.init_web_server() self.start_event_processor() self.start_watchdog() - self.flask_app.run(host='0.0.0.0', port=self.config.web_port, debug=False) + self.flask_app.run(host='127.0.0.1', port=5001, debug=False) self.stop() def stop(self): diff --git a/frigate/config.py b/frigate/config.py index 30453110b..a77201a5f 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -123,7 +123,7 @@ CAMERAS_SCHEMA = vol.Schema( vol.Optional('zones', default={}): { str: { vol.Required('coordinates'): vol.Any(str, [str]), - 'filters': FILTER_SCHEMA + vol.Optional('filters', default={}): FILTER_SCHEMA } }, vol.Optional('save_clips', default=DEFAULT_CAMERA_SAVE_CLIPS): { @@ -145,7 +145,6 @@ CAMERAS_SCHEMA = vol.Schema( FRIGATE_CONFIG_SCHEMA = vol.Schema( { - vol.Optional('web_port', default=5000): int, vol.Optional('detectors', default=DEFAULT_DETECTORS): DETECTORS_SCHEMA, 'mqtt': MQTT_SCHEMA, vol.Optional('save_clips', default={}): SAVE_CLIPS_SCHEMA, @@ -566,10 +565,6 @@ class FrigateConfig(): return config - @property - def web_port(self): - return self._web_port - @property def detectors(self) -> Dict[str, DetectorConfig]: return self._detectors diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 54f5d2132..f5c0345f1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -22,12 +22,12 @@ http { keepalive_timeout 65; upstream frigate_api { - server localhost:5000; + server localhost:5001; keepalive 1024; } server { - listen 80; + listen 5000; location /stream/ { add_header 'Cache-Control' 'no-cache';