Skip to content

Commit

Permalink
22.05.2
Browse files Browse the repository at this point in the history
Update Module Services, Mycroft-compatible Config, ovos-core 0.0.4
  • Loading branch information
NeonDaniel authored Aug 23, 2022
2 parents 99f1c39 + 12eba9c commit 641bda1
Show file tree
Hide file tree
Showing 67 changed files with 1,186 additions and 1,859 deletions.
47 changes: 41 additions & 6 deletions .github/workflows/setup_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,33 @@ on:
workflow_dispatch:

jobs:
remote:
core_and_skills:
strategy:
matrix:
python-version: [ 3.7, 3.9 ]
python-version: [ 3.7, 3.8, 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install System Dependencies
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev python3-dev
pip install wheel
- name: Test Core Module Installation
run: |
pip install .[core_modules]
- name: Test Skills Installation
run: |
pip install .[skills_required,skills_essential,skills_default,skills_extended]
legacy-remote:
strategy:
matrix:
python-version: [ 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -23,7 +46,7 @@ jobs:
mkdir -p ~/.local/share/neon
echo ${GOOGLE_KEY}>~/.local/share/neon/google.json
echo ${AWS_CREDS}>~/.local/share/neon/aws.json
bash test/setup_remote.sh ${NEON_TOKEN}
bash test/legacy_setup_remote.sh ${NEON_TOKEN}
env:
NEON_TOKEN: ${{secrets.neon_token}}
GOOGLE_KEY: ${{secrets.google_api_key}}
Expand All @@ -46,7 +69,13 @@ jobs:
name: core-logs-remote-${{ matrix.python-version }}
path: ~/.local/share/neon/logs/*.log
if: always()
dev_local:
- name: Upload Configuration
uses: actions/upload-artifact@v2
with:
name: configuration-remote-${{ matrix.python-version }}
path: ~/.config/neon/neon.yaml
if: always()
legacy-dev_local:
strategy:
matrix:
python-version: [ 3.8 ]
Expand All @@ -60,7 +89,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Core
run: |
bash test/setup_dev_local.sh ${NEON_TOKEN}
bash test/legacy_setup_dev_local.sh ${NEON_TOKEN}
env:
NEON_TOKEN: ${{secrets.neon_token}}
- name: Test Core Setup
Expand All @@ -80,5 +109,11 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: core-logs-dev-local-${{ matrix.python-version }}
path: test/logs/*.log
path: ~/test/logs/*.log
if: always()
- name: Upload Configuration
uses: actions/upload-artifact@v2
with:
name: configuration-dev-local-${{ matrix.python-version }}
path: ~/.config/neon/neon.yaml
if: always()
12 changes: 2 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -26,7 +24,7 @@ jobs:
util_tests:
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand Down Expand Up @@ -78,7 +76,7 @@ jobs:
unit_tests:
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10' ]
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -104,12 +102,6 @@ jobs:
with:
name: configuration-test-results
path: tests/configuration-test-results.xml
- name: Upload config file
uses: actions/upload-artifact@v2
with:
name: ovos.conf
path: ~/.config/OpenVoiceOS/ovos.conf
if: always()

- name: Test Language
run: |
Expand Down
30 changes: 24 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ LABEL vendor=neon.ai \

ENV NEON_CONFIG_PATH /config

RUN apt-get update && \
apt-get install -y \
curl \
gpg

RUN curl https://forslund.github.io/mycroft-desktop-repo/mycroft-desktop.gpg.key | \
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/mycroft-desktop.gpg --import - && \
chmod a+r /etc/apt/trusted.gpg.d/mycroft-desktop.gpg && \
echo "deb http://forslund.github.io/mycroft-desktop-repo bionic main" \
> /etc/apt/sources.list.d/mycroft-mimic.list


RUN apt-get update && \
apt-get install -y \
gcc \
Expand All @@ -16,8 +28,16 @@ RUN apt-get update && \
portaudio19-dev \
libsndfile1 \
libpulse-dev \
alsa-utils \
libasound2-plugins \
pulseaudio-utils \
ffmpeg \
git # TODO: git required for getting scripts, skill should be refactored to remove this dependency
mimic \
sox \
git

# TODO: git required for getting scripts, skill should be refactored to remove this dependency
# TODO: sox, mimic required for demo skill, audio service should be refactored to handle TTS engines/voices in request

ADD . /neon_core
WORKDIR /neon_core
Expand All @@ -28,11 +48,9 @@ RUN pip install wheel && \
COPY docker_overlay/ /
RUN chmod ugo+x /root/run.sh

# TODO: Below link is patching a bug in the homescreen skill/ovos-utils
RUN mkdir /opt/mycroft && \
ln -s /root/.local/share/neon/skills /opt/mycroft/skills

CMD ["/root/run.sh"]

FROM base as default_skills
RUN neon-install-default-skills
RUN pip install .[skills_required,skills_essential,skills_default,skills_extended]
# TODO: Default skill installation is a temporary step until all skills are pip installable
RUN neon-install-default-skills
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ You will need `docker` and `docker-compose` available. Docker provides updated g
Neon Core is only tested on Ubuntu, but should be compatible with any linux distribution that uses
[PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/).

> *Note*: By default, only the `root` user has permissions to interact with Docker under Ubuntu.
> To allow the current user to modify Docker containers, you can add them to the `docker` group with:
> `sudo usermod -aG docker $USER && newgrp`
## b. Running Neon
You can clone the repository, or just copy the `docker` directory contents onto your local system; this document will
assume that the repository is cloned to: `~/NeonCore`.

> *Note*: The `docker` directory includes required hidden files. If you copy files, make sure to include any hidden
> files. In must Ubuntu distros, you can toggle hidden file visibility in the file explorer with `CTRL` + `h`.
You can start all core modules with:
```shell
# cd into the directory containing docker-compose.yml
Expand Down Expand Up @@ -94,7 +101,7 @@ to:
```
## e. Configuration
The `ngi_local_conf.yml` file included in the `docker` directory contains a default configuration
The `neon.yaml` file included in the `docker` directory contains a default configuration
that may be modified to specify different plugins and other runtime settings.
The `docker` directory is mounted read-only to `/config` in each of the containers,
so model files may be placed there and the configuration updated to use different STT/TTS plugins with
Expand Down Expand Up @@ -536,11 +543,10 @@ Skills Service
docker run -d \
--name=neon_skills \
--network=host \
-v ~/.config/pulse/cookie:/root/.config/pulse/cookie:ro \
-v ~/.config/pulse/cookie:/tmp/pulse_cookie:ro \
-v ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro \
-v ${NEON_CONFIG_DIR}:/config \
--device=/dev/snd:/dev/snd \
-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
-e PULSE_COOKIE=/tmp/pulse_cookie \
neon_skills
```
>*Note:* The above example assumes `NEON_CONFIG_DIR` contains valid configuration
4 changes: 2 additions & 2 deletions docker/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NEON_SKILLS_DIR=./
NEON_CONFIG_PATH=./
NEON_SKILLS_DIR=./skills/
NEON_CONFIG_PATH=./config/
17 changes: 17 additions & 0 deletions docker/config/neon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
play_wav_cmdline: "play %1"
play_mp3_cmdline: "play %1"
play_ogg_cmdline: "play %1"
websocket:
host: neon-messagebus
gui_websocket:
host: neon-gui
gui:
idle_display_skill: skill-homescreen-lite.openvoiceos
ready_settings:
- skills
- speech
- audio
- gui
#MQ:
# server: mq.2021.us
# port: 25672
18 changes: 11 additions & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO: Handle XDG_CONFIG_HOME envvar for persistent mounted config
version: '3.1'
networks:
neon-core:
Expand Down Expand Up @@ -26,11 +27,11 @@ services:
- neon-core
volumes:
- config:/config:ro
- ~/.config/pulse/cookie:/root/.config/pulse/cookie:ro
- ~/.config/pulse/cookie:/tmp/pulse_cookie:ro
- ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro
environment:
- PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native
- PULSE_COOKIE=/root/.config/pulse/cookie
- PULSE_COOKIE=/tmp/pulse_cookie
devices:
- /dev/snd:/dev/snd
neon-skills:
Expand All @@ -41,13 +42,13 @@ services:
ports:
- 8000:8000
volumes:
- config:/config:ro
- ~/.config/pulse/cookie:/root/.config/pulse/cookie:ro
- config:/config:rw
- ~/.config/pulse/cookie:/tmp/pulse_cookie:ro
- ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro
- ${NEON_SKILLS_DIR}:/skills:ro
environment:
- PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native
- PULSE_COOKIE=/root/.config/pulse/cookie
- PULSE_COOKIE=/tmp/pulse_cookie
devices:
- /dev/snd:/dev/snd
neon-audio:
Expand All @@ -57,11 +58,14 @@ services:
- neon-core
volumes:
- config:/config:ro
- ~/.config/pulse/cookie:/root/.config/pulse/cookie:ro
- ~/.config/pulse/cookie:/tmp/pulse_cookie:ro
- ${XDG_RUNTIME_DIR}/pulse:${XDG_RUNTIME_DIR}/pulse:ro
- /run/dbus/system_dbus_socket:/run/dbus/system_dbus_socket:rw
- /tmp/.X11-unix:/tmp/.X11-unix:ro
environment:
- PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native
- PULSE_COOKIE=/root/.config/pulse/cookie
- PULSE_COOKIE=/tmp/pulse_cookie
- DISPLAY=${DISPLAY}
devices:
- /dev/snd:/dev/snd
neon-gui:
Expand Down
Loading

0 comments on commit 641bda1

Please sign in to comment.