Blake Blackshear 4 years ago
parent
commit
ec1a8ebd4a
4 changed files with 6 additions and 12 deletions
  1. 1 3
      docker/Dockerfile.base
  2. 2 1
      frigate/app.py
  3. 1 6
      frigate/config.py
  4. 2 2
      nginx/nginx.conf

+ 1 - 3
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/
 

+ 2 - 1
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):

+ 1 - 6
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

+ 2 - 2
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';