Skip to content

Commit

Permalink
Add details on installing from PyPi in README
Browse files Browse the repository at this point in the history
Also:
- Bump version to `0.1.1`
- Pull Docker image rather than building in docker-compose.yml
  • Loading branch information
slashtechno committed Oct 27, 2023
1 parent 8026fd8 commit 1cf74e1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down
13 changes: 7 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 1cf74e1

Please sign in to comment.