first commit from PC
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM snowzach/doods2:latest
|
||||
|
||||
RUN groupadd -r doods && useradd -m -s /bin/bash -d /opt/doods -g doods doods
|
||||
RUN chsh -s /usr/sbin/nologin root
|
||||
|
||||
RUN chown -R doods:doods /opt/doods
|
||||
|
||||
ENV PATH "${PATH}:/opt/doods"
|
||||
|
||||
ENV HOME /opt/doods
|
||||
|
||||
USER doods
|
||||
|
||||
ENTRYPOINT ["python3", "main.py"]
|
||||
CMD ["api"]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
doods:
|
||||
detectors:
|
||||
- name: default
|
||||
type: tflite
|
||||
modelFile: models/coco_ssd_mobilenet_v1_1.0_quant.tflite
|
||||
labelFile: models/coco_labels0.txt
|
||||
numThreads: 4
|
||||
numConcurrent: 4
|
||||
hwAccel: false
|
||||
@@ -0,0 +1,46 @@
|
||||
version: "3"
|
||||
services:
|
||||
service:
|
||||
# image: "beatzaplenty/doods2"
|
||||
image: snowzach/doods2:latest
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /var
|
||||
- /run
|
||||
hostname: doods.alm.lan
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile
|
||||
|
||||
|
||||
volumes:
|
||||
- ./models/:/opt/doods/models/:rw
|
||||
- ./config.yaml:/opt/doods/config.yaml
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik_default
|
||||
labels:
|
||||
- "io.portainer.accesscontrol.public"
|
||||
- "traefik.http.routers.doods.rule=Host(`doods.lan.ddnsgeek.com`)"
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.doods.entrypoints=websecure"
|
||||
- "traefik.http.routers.doods.tls.certresolver=myresolver"
|
||||
- "traefik.http.routers.doods.middlewares=error-pages-middleware"
|
||||
- "traefik.http.services.doods.loadbalancer.server.port=8080"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.05'
|
||||
memory: 350m
|
||||
# pids: 2
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 5
|
||||
healthcheck:
|
||||
test: "curl --fail http://localhost:8080 || exit 1"
|
||||
|
||||
|
||||
networks:
|
||||
traefik_default:
|
||||
external: true
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
mkdir -p models
|
||||
# coco_ssd_mobilenet_v1_1.0_quant_2018_06_29
|
||||
wget https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip && unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip && rm coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip && mv detect.tflite models/coco_ssd_mobilenet_v1_1.0_quant.tflite && rm labelmap.txt
|
||||
wget https://dl.google.com/coral/canned_models/coco_labels.txt && mv coco_labels.txt models/coco_labels0.txt
|
||||
# mobilenet_ssd_v2_coco_quant_postprocess_edgetpu
|
||||
wget https://dl.google.com/coral/canned_models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite && mv mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
|
||||
# faster_rcnn_inception_v2_coco_2018_01_28
|
||||
wget http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_v2_coco_2018_01_28.tar.gz && tar -zxvf faster_rcnn_inception_v2_coco_2018_01_28.tar.gz faster_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb --strip=1 && mv frozen_inference_graph.pb models/faster_rcnn_inception_v2_coco_2018_01_28.pb && rm faster_rcnn_inception_v2_coco_2018_01_28.tar.gz
|
||||
wget https://raw.githubusercontent.com/amikelive/coco-labels/master/coco-labels-2014_2017.txt && mv coco-labels-2014_2017.txt models/coco_labels1.txt
|
||||
|
||||
cat << EOF > example.yaml
|
||||
doods:
|
||||
detectors:
|
||||
- name: default
|
||||
type: tflite
|
||||
modelFile: models/coco_ssd_mobilenet_v1_1.0_quant.tflite
|
||||
labelFile: models/coco_labels0.txt
|
||||
numThreads: 0
|
||||
numConcurrent: 4
|
||||
- name: edgetpu
|
||||
type: tflite
|
||||
modelFile: models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
|
||||
labelFile: models/coco_labels0.txt
|
||||
numThreads: 0
|
||||
numConcurrent: 4
|
||||
hwAccel: true
|
||||
- name: tensorflow
|
||||
type: tensorflow
|
||||
modelFile: models/faster_rcnn_inception_v2_coco_2018_01_28.pb
|
||||
labelFile: models/coco_labels1.txt
|
||||
width: 224
|
||||
height: 224
|
||||
numThreads: 0
|
||||
numConcurrent: 4
|
||||
EOF
|
||||
Reference in New Issue
Block a user