From 1cf74e13edd4259b58578f27d66bfc83bbb179c2 Mon Sep 17 00:00:00 2001 From: slashtechno <77907286+slashtechno@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:54:28 -0500 Subject: [PATCH] Add details on installing from PyPi in README Also: - Bump version to `0.1.1` - Pull Docker image rather than building in docker-compose.yml --- Dockerfile | 3 +++ README.md | 16 ++++++++++++---- docker-compose.yml | 13 +++++++------ pyproject.toml | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d6461c..5f0b885 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM python:3.10.5-buster +LABEL org.opencontainers.image.description "Dokcer image for running wyzely-detect" +LABEL org.opencontainers.image.source "https://github.com/slashtechno/wyzely-detect" + RUN apt update && apt install libgl1 -y RUN pip install poetry diff --git a/README.md b/README.md index 151cd63..902316d 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,12 @@ Recognize faces/objects in a video stream (from a webcam or a security camera) a ## Prerequisites -### Poetry/Python +### Python - Camera, either a webcam or a Wyze Cam - All RTSP feeds _should_ work, however. - Python 3.10 or 3.11 -- Poetry +- Poetry (optional) + ### Docker - A Wyze Cam - Any other RTSP feed _should_ work, as mentioned above @@ -28,13 +29,20 @@ Recognize faces/objects in a video stream (from a webcam or a security camera) a ## Usage ### Installation +Cloning the repository is not required when installing from PyPi but is required when installing from source 1. Clone this repo with `git clone https://github.com/slashtechno/wyzely-detect` 2. `cd` into the cloned repository 3. Then, either install with [Poetry](https://python-poetry.org/) or run with Docker #### Docker -1. Modify to `docker-compose.yml` to achieve desired configuration -2. Run in the background with `docker compose up -d +1. Modify to `docker-compose.yml` to achieve desired configuration +2. Run in the background with `docker compose up -d + +#### Installing from PyPi with pip +This assumes you have Python 3.10 or 3.11 installed +1. `pip install wyzely-detect` + a. You may need to use `pip3` instead of `pip` +2. `wyzely-detect` #### Poetry 1. `poetry install` diff --git a/docker-compose.yml b/docker-compose.yml index 4480bde..497cd0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: container_name: bridge-wyzely-detect restart: unless-stopped image: mrlt8/wyze-bridge:latest - # I think we can remove the ports, since we're using the network - # Just an unnecesary security risk + # The ports can be removed since we're using the network + # Just an unnecesary security risk to expose them but can be useful for debugging # ports: # - 1935:1935 # RTMP # - 8554:8554 # RTSP (this is really the only one we need) @@ -36,10 +36,11 @@ services: wyzely-detect: container_name: wyzely-detect restart: unless-stopped - # image: ghcr.io/slashtechno/wyzely-detect:latest - build: - context: . - dockerfile: Dockerfile + image: ghcr.io/slashtechno/wyzely-detect:latest + # Building from source is also an option + # build: + # context: . + # dockerfile: Dockerfile volumes: - ./faces:/app/faces networks: diff --git a/pyproject.toml b/pyproject.toml index 0072a60..232eff0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wyzely-detect" -version = "0.1.0" +version = "0.1.1" description = "Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your devices" authors = ["slashtechno <77907286+slashtechno@users.noreply.github.com>"] repository = "https://github.com/slashtechno/wyzely-detect"