Skip to content

Commit

Permalink
Merge branch 'main' of github.com:koush/scrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed May 3, 2024
2 parents 6fd6c7a + 6d1cf5d commit a82972d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
34 changes: 24 additions & 10 deletions install/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.5"

# The Scrypted docker-compose.yml file typically resides at:
# ~/.scrypted/docker-compose.yml

Expand Down Expand Up @@ -40,14 +38,28 @@ services:
# See volumes section below to use the host daemon.
# - SCRYPTED_DOCKER_AVAHI=true

# Uncomment next 3 lines for Nvidia GPU support.
# NVIDIA (Part 1 of 3)
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all

# NVIDIA (Part 2 of 3) - Ensure CUDA versions below match the host system
# runtime: nvidia
# Necessary to communicate with host dbus for avahi-daemon.
security_opt:
- apparmor:unconfined
# pull_policy: build
# build:
# context: .
# dockerfile_inline: |
# FROM ghcr.io/koush/scrypted
# RUN apt update -q \
# && apt install wget \
# && wget -qO /cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
# && dpkg -i /cuda-keyring.deb \
# && apt update -q \
# && apt install -y cuda-nvcc-12-4 libcublas-12-4 libcudnn8 cuda-libraries-12-4

volumes:
# NVIDIA (Part 3 of 3)
# - /etc/OpenCL/vendors/nvidia.icd:/etc/OpenCL/vendors/nvidia.icd

# Scrypted NVR Storage (Part 3 of 3)

# Modify to add the additional volume for Scrypted NVR.
Expand Down Expand Up @@ -98,11 +110,13 @@ services:

# logging is noisy and will unnecessarily wear on flash storage.
# scrypted has per device in memory logging that is preferred.
# enable the log file if enhanced debugging is necessary.
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
driver: "none"
# driver: "json-file"
# options:
# max-size: "10m"
# max-file: "10"
labels:
- "com.centurylinklabs.watchtower.scope=scrypted"

Expand Down
10 changes: 5 additions & 5 deletions plugins/openvino/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/openvino/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.79"
"version": "0.1.80"
}
16 changes: 16 additions & 0 deletions plugins/openvino/src/ov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ def __init__(self, nativeId: str | None = None):
mode = self.storage.getItem("mode")
if mode == "Default":
mode = "AUTO"

dgpus = []
# search for NVIDIA dGPU, as that is not preferred by AUTO for some reason?
# todo: create separate core per NVIDIA dGPU as inference does not seem to
# be distributed to multiple dGPU.
for device in self.available_devices:
try:
full_device_name = self.core.get_property(device, "FULL_DEVICE_NAME")
if "NVIDIA" in full_device_name and "dGPU" in full_device_name:
dgpus.append(device)
except:
pass

if len(dgpus):
mode = f"AUTO:{','.join(dgpus)},CPU"

mode = mode or "AUTO"
self.mode = mode

Expand Down

0 comments on commit a82972d

Please sign in to comment.