Skip to content

Commit

Permalink
double-take-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
skrashevich committed Dec 8, 2023
1 parent 6df41b9 commit a8de06f
Show file tree
Hide file tree
Showing 6 changed files with 801 additions and 0 deletions.
645 changes: 645 additions & 0 deletions double-take-beta/CHANGELOG.md

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions double-take-beta/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# syntax = docker/dockerfile:1.4
ARG BUILD_FROM

FROM skrashevich/double-take:1.13.11.9rc0

ARG S6_OVERLAY_VERSION=3.1.6.0
ARG BUILD_ARCH=amd64
RUN \
apt-get update \
\
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
jq\
tzdata \
xz-utils \
\
&& S6_ARCH="${BUILD_ARCH}" \
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="i686"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" \
| tar -C / -Jxpf - \
\
&& mkdir -p /etc/fix-attrs.d \
&& mkdir -p /etc/services.d

# Copy root filesystem
ADD --link rootfs /

ENV CONFIG_PATH=/data/options.json
LABEL \
io.hass.version="1.13.11.9rc0" \
io.hass.type="addon" \
io.hass.arch="aarch64|amd64|armv7"

ADD --link https://github.com/hassio-addons/bashio/archive/v0.14.3.tar.gz /tmp/bashio.tar.gz
RUN mkdir -p /tmp/bashio \
&& tar zxvf \
/tmp/bashio.tar.gz \
--strip 1 -C /tmp/bashio \
\
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio

COPY --chmod=755 <<-EOT /run.sh
#!/usr/bin/with-contenv bashio

export STORAGE_PATH=$(bashio::config 'STORAGE_PATH')
export CONFIG_PATH=$(bashio::config 'CONFIG_PATH')
export SECRETS_PATH=$(bashio::config 'SECRETS_PATH')
export MEDIA_PATH=$(bashio::config 'MEDIA_PATH')
export IPFILTER=$(cat /data/options.json | jq '.IPFILTER')

cd /double-take && /bin/bash ./entrypoint.sh
EOT
RUN chmod a+x /run.sh
WORKDIR /double-take
CMD [ "/run.sh" ]
13 changes: 13 additions & 0 deletions double-take-beta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[![Double Take](https://badgen.net/github/release/skrashevich/double-take)](https://github.com/skrashevich/double-take) [![Double Take](https://badgen.net/github/stars/skrashevich/double-take)](https://github.com/skrashevich/double-take/stargazers) [![Docker Pulls](https://flat.badgen.net/docker/pulls/skrashevich/double-take)](https://hub.docker.com/r/skrashevich/double-take)

![amd64][amd64-shield]
![arm64][arm64-shield]

# Double Take BETA

Unified UI and API for processing and training images for facial recognition.

[Documentation](https://github.com/skrashevich/double-take/)

[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[arm64-shield]: https://img.shields.io/badge/arm64-yes-green.svg
41 changes: 41 additions & 0 deletions double-take-beta/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Double Take (Release Candidate)
version: 1.13.11.9rc0
image: ghcr.io/skrashevich/hassio-addon-double-take-beta-{arch}
url: https://double-take.site/redirect.php?location=github
panel_icon: mdi:face-recognition
slug: double-take-beta
description: BETA VERSION of Unified UI and API for processing and training images for facial recognition
arch:
- amd64
- aarch64
- armv7
startup: application
boot: auto
ingress: true
tmpfs: true
init: false
full_access: false
privileged:
- SYS_ADMIN
ingress_port: 3000
ports:
3000/tcp: 3000
ports_description:
3000/tcp: Web interface (not required for Home Assistant ingress)
map:
- media:rw
- config:rw
environment:
HA_ADDON: "true"
options:
STORAGE_PATH: "/config/double-take"
CONFIG_PATH: "/config/double-take"
SECRETS_PATH: "/config/double-take"
MEDIA_PATH: "/media/double-take"
IPFILTER: true
schema:
STORAGE_PATH: str
CONFIG_PATH: str
SECRETS_PATH: str
MEDIA_PATH: str
IPFILTER: bool
Binary file added double-take-beta/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions double-take-beta/rootfs/usr/bin/service
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# This script patches all service commands into the appropriate s6- commands
# Why not systemd? Docker said no, so did we ;)
# ==============================================================================

start() {
s6-svc -wU -u -T2500 "/run/service/${service}"
}

stop() {
s6-svc -wD -d -T2500 "/run/service/${service}"
}

restart() {
stop
start
}

status() {
s6-svstat "/run/service/${service}"
}

service="$1"
command="$2"

if [[ ! -d "/run/service/${service}" ]] ; then
echo "s6 service not found for ${service}, exiting..."
exit
fi;

${command} "${service}"

0 comments on commit a8de06f

Please sign in to comment.