Skip to content

Final steps before the run

Before going further, please make sure to refer to this section as the following commands could defer depending your setup.

Get the ovos-docker sources

The ~/hivemind directory is only required if you plan to use HiveMind.

git clone https://github.com/OpenVoiceOS/ovos-docker.git ~/ovos-docker
mkdir -p ~/ovos/{config/phal,share,tmp} ~/hivemind/{config/phal,share}
chown ${USER}:${USER} -R ~/ovos ~/hivemind
cd ~/ovos-docker/compose

Enable user manager

Because some containers require /run/user/1000 to be mounted, systemd should be instructed to log the user during the boot process and make /run/user/1000 directory available before the containers start.

sudo loginctl enable-linger $USER
sudo loginctl enable-linger $USER

Set the environment file

.env file is a strong requirement

Please make sure to read and understand this section as if you don't then the deployment migth fail.

The composer requires an environment file in order to deploy the services and volumes with the correct settings for your setup.

alpha version by default

As mentioned in this section, the current default VERSION (tag) is alpha.

The example files start with a . (dot) which means they are hidden, use the ls -a command to list all the files included the hidden ones.

Below is an example of .env for Linux (not Raspberry Pi), please read this section for more details about what these variables do.

.env
DISPLAY=:0
HIVEMIND_CONFIG_FOLDER=~/hivemind/config
HIVEMIND_CONFIG_PHAL_FOLDER=~/hivemind/config/phal
HIVEMIND_SHARE_FOLDER=~/hivemind/share
HIVEMIND_USER=hivemind
INPUT_GID=102
OVOS_CONFIG_FOLDER=~/ovos/config
OVOS_CONFIG_PHAL_FOLDER=~/ovos/config/phal
OVOS_SHARE_FOLDER=~/ovos/share
OVOS_USER=ovos
PULL_POLICY=always
TMP_FOLDER=~/ovos/tmp
TZ=America/Montreal
VERSION=alpha
VIDEO_GID=44
XDG_RUNTIME_DIR=/run/user/1000
cp .env-raspberrypi .env
cp .env.example .env
cp .env.example .env
cp .env.example .env

Examples are provided, please make sure to select the right one and to set the proper values.

I2C and SPI on Raspberry Pi

The Raspberry Pi board supports I2C, I2S and SPI buses. These three buses must be enabled in order to allow the containers below to start:

  • ovos_core
  • ovos_phal
  • ovos_phal_admin

Follow the steps below to enable I2C, I2S and SPI.

echo "dtparam=i2c_arm=on" | sudo tee -a /boot/config.txt
echo "dtparam=i2s=on" | sudo tee -a /boot/config.txt
echo "dtparam=spi=on" | sudo tee -a /boot/config.txt
echo "i2c-dev" | sudo tee /etc/modules-load.d/i2c.conf
sudo reboot