Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHX-1862] feat: deliver high throughput #53

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,7 @@ You can combine this with the graphical user interface by adding the `-u` flag

This flag is indicating that the utils container should be started, which
contains notably the UI functionality.

#### -h (high throughput) flag

This flag starts the `redact` container with additional configuration parameters which allow high throughput for application instances running on A10 machines. This option should only be used if suggested by brighter AI technical support personnel.
26 changes: 18 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,24 @@ services:
volumes:
- ${INSTALLATION_DIR}/${REDACT_LICENSE_FILE}:/license.bal
environment:
REDACT_INFER_METRICS_URL: 'redact-gpu:8000'
REDACT_GPU_URL: 'redact-gpu:8001'
DISABLE_FACES: ${DISABLE_FACES}
DISABLE_LICENSE_PLATES: ${DISABLE_LICENSE_PLATES}
DISABLE_BLUR: ${DISABLE_BLUR}
DISABLE_DNAT: ${DISABLE_DNAT}
DISABLE_MASK: ${DISABLE_MASK}
DISABLE_FULL_BODIES: ${DISABLE_FULL_BODIES}
- REDACT_INFER_METRICS_URL=redact-gpu:8000
- REDACT_GPU_URL=redact-gpu:8001
- DISABLE_FACES
georgkoester marked this conversation as resolved.
Show resolved Hide resolved
- DISABLE_LICENSE_PLATES
- DISABLE_BLUR
- DISABLE_DNAT
- DISABLE_MASK
- DISABLE_FULL_BODIES
- NUM_PROC_IMAGE_COMPOSER
- NUM_PROC_DETECTION
- NUM_PROC_FACE_TRACKING
- NUM_PROC_LICENSE_PLATE_TRACKING
- NUM_PROC_FACE_LANDMARKS_SMOOTHING
- NUM_PROC_LICENSE_PLATE_LANDMARKS_SMOOTHING
- NUM_PROC_SPLITTER
- NUM_PROC_AGGREGATOR
- NUM_PARALLEL_ACTIVE_VIDEOS
- SPLITTER_MAX_ACTIVE_FRAMES

redact-gpu:
image: ${REDACT_GPU_IMAGE}
Expand Down
14 changes: 14 additions & 0 deletions high-throughput.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2021-2024 Brighter AI Technologies GmbH
# SPDX-License-Identifier: MIT
REDACT_GPU_IMAGE="docker.brighter.ai/redact-gpu:3.3.0-A10"
fredyeah marked this conversation as resolved.
Show resolved Hide resolved

NUM_PROC_IMAGE_COMPOSER=10
NUM_PROC_DETECTION=10
NUM_PROC_FACE_TRACKING=10
NUM_PROC_LICENSE_PLATE_TRACKING=10
NUM_PROC_FACE_LANDMARKS_SMOOTHING=2
NUM_PROC_LICENSE_PLATE_LANDMARKS_SMOOTHING=2
NUM_PROC_SPLITTER=50
NUM_PROC_AGGREGATOR=50
NUM_PARALLEL_ACTIVE_VIDEOS=50
SPLITTER_MAX_ACTIVE_FRAMES=1500
fredyeah marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ fi
# copy license and external files
mkdir "$installation_dir"
cp docker-compose.env "$installation_dir"
cp high-throughput.env "$installation_dir"
cp docker-compose.yaml "$installation_dir"
cp license.bal "$installation_dir"
cp start_redact.sh "$installation_dir"
Expand Down
8 changes: 6 additions & 2 deletions start_redact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ else
installation_dir="$INSTALLATION_DIR"
fi
source "$installation_dir/docker-compose.env"
set +a

while getopts "ua" opt; do
while getopts "uah" opt; do
case $opt in
u) ui="SET"
;;
a) attach="SET"
;;
h) source "$installation_dir/high-throughput.env"
;;
esac
done

# turn of env var marking from sourced env files
georgkoester marked this conversation as resolved.
Show resolved Hide resolved
set +a

# check license file
if [ ! -f "$installation_dir/${REDACT_LICENSE_FILE}" ]; then
echo "Please make sure that license file with path \"$installation_dir/${REDACT_LICENSE_FILE}\" exists."
Expand Down