From d865c24ca568d80a078650b426f1f70f5bb045a0 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 7 Nov 2019 12:16:33 +0100 Subject: [PATCH] Assist (#817) * Generic voice Assistant * Renaming * Cleanup * add execution * Rename * Fix options * Update readme * Fix args * Fix lint --- .hadolint.yaml | 1 + ada/Dockerfile | 35 +++++++++++++++++++++++++++ ada/README.md | 53 +++++++++++++++++++++++++++++++++++++++++ ada/azure-pipelines.yml | 22 +++++++++++++++++ ada/build.json | 9 +++++++ ada/config.json | 18 ++++++++++++++ ada/data/run.sh | 4 ++++ 7 files changed, 142 insertions(+) create mode 100644 ada/Dockerfile create mode 100644 ada/README.md create mode 100644 ada/azure-pipelines.yml create mode 100644 ada/build.json create mode 100644 ada/config.json create mode 100755 ada/data/run.sh diff --git a/.hadolint.yaml b/.hadolint.yaml index 6c915686c16..d29b725401b 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -3,6 +3,7 @@ ignored: - DL3006 - DL3007 - DL3008 + - DL3013 - DL3018 - DL4006 - SC2046 diff --git a/ada/Dockerfile b/ada/Dockerfile new file mode 100644 index 00000000000..7a1ccfaa4cc --- /dev/null +++ b/ada/Dockerfile @@ -0,0 +1,35 @@ +ARG BUILD_FROM +FROM ${BUILD_FROM} + +# Install Dude +WORKDIR /usr/src/ada +ARG ADA_VERSION + +RUN apt-get update && apt-get install -y --no-install-recommends \ + portaudio19-dev \ + libsndfile1 \ + mplayer \ + libffi-dev \ + python3 \ + python3-pip \ + python3-dev \ + git \ + build-essential \ + \ + && git clone --depth 1 -b ${ADA_VERSION} https://github.com/home-assistant/dude . \ + && rm -rf .git \ + && pip3 install -U setuptools wheel \ + && pip3 install -r requirements.txt \ + && pip3 install -e . \ + && python3 -m compileall dude \ + \ + && apt-get purge -y --auto-remove \ + git \ + build-essential \ + python3-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR / +COPY data/run.sh / + +CMD ["/run.sh"] diff --git a/ada/README.md b/ada/README.md new file mode 100644 index 00000000000..9c52cd7fce4 --- /dev/null +++ b/ada/README.md @@ -0,0 +1,53 @@ +# Hass.io Core Add-on: Ada + +Home Assistant featured voice assist. + +![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] ![Supports i386 Architecture][i386-shield] + +## About + +## Installation + +The installation of this add-on is straightforward and easy to do. + +1. Navigate in your Home Assistant frontend to **Hass.io** -> **Add-on Store**. +2. Find the "Almond" add-on and click it. +3. Click on the "INSTALL" button. + +## How to use + +The basic thing to get the add-on running would be: + +1. Start the add-on. + +## Configuration + +Example add-on configuration: + +```json +{ +} +``` + +## Support + +Got questions? + +You have several options to get them answered: + +- The [Home Assistant Discord Chat Server][discord]. +- The Home Assistant [Community Forum][forum]. +- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit] + +In case you've found an bug, please [open an issue on our GitHub][issue]. + +[aarch64-shield]: https://img.shields.io/badge/aarch64-no-red.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg +[discord]: https://discord.gg/c5DvZ4e +[forum]: https://community.home-assistant.io +[i386-shield]: https://img.shields.io/badge/i386-no-red.svg +[issue]: https://github.com/home-assistant/hassio-addons/issues +[reddit]: https://reddit.com/r/homeassistant +[repository]: https://github.com/hassio-addons/repository diff --git a/ada/azure-pipelines.yml b/ada/azure-pipelines.yml new file mode 100644 index 00000000000..abd80965856 --- /dev/null +++ b/ada/azure-pipelines.yml @@ -0,0 +1,22 @@ +# https://dev.azure.com/home-assistant + +trigger: + branches: + include: + - master + paths: + include: + - ada/* +pr: none + +variables: + - name: versionBuilder + value: '2.0' + - group: docker + + +jobs: +- template: /.azure/azp-template-addon.yml + parameters: + addon: 'ada' + arch: '--amd64 --armv7' diff --git a/ada/build.json b/ada/build.json new file mode 100644 index 00000000000..fbe6b2cf248 --- /dev/null +++ b/ada/build.json @@ -0,0 +1,9 @@ +{ + "build_from": { + "amd64": "homeassistant/amd64-base-debian:buster", + "armv7": "homeassistant/armv7-base-debian:buster" + }, + "args": { + "ADA_VERSION": "0.1" + } +} diff --git a/ada/config.json b/ada/config.json new file mode 100644 index 00000000000..01dd89df552 --- /dev/null +++ b/ada/config.json @@ -0,0 +1,18 @@ +{ + "name": "Hey Ada!", + "version": "0.1", + "slug": "ada", + "description": "Home Assistant featured voice assist", + "url": "https://home-assistant.io/addons/ada/", + "arch": ["armv7", "amd64"], + "startup": "application", + "boot": "auto", + "audio": true, + "homeassistant": "0.102.0.dev", + "homeassistant_api": true, + "options": { + }, + "schema": { + }, + "image": "homeassistant/{arch}-addon-ada" +} diff --git a/ada/data/run.sh b/ada/data/run.sh new file mode 100755 index 00000000000..52289100a7d --- /dev/null +++ b/ada/data/run.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bashio + + +exec python3 -m ada