Public | Automated Build

Last pushed: 3 months ago
Short Description
Dockerized automated public build of Mycroft Core
Full Description

Mycroft Docker Development Environment

How to build and run

  1. Git pull this repository - git clone

  2. Build the docker image with
    docker build -t ${USER}/mycroft . in the directory that you have checked out.

  3. Run the following to start up mycroft:
    docker run --device /dev/snd:/dev/snd -itd ${USER}/mycroft

  4. Want a interactive cli session to register the device and test things, then run the following and type pair my device to start, we are mounting a local filesystem into the container so we can store our Identity file to reuse this same device over and over on new containers:
    docker run -it -p 8181:8181 -v /path_on_local_device:/root/.mycroft ${USER}/mycroft /bin/bash /mycroft/ai/ start -d

  5. Confirm via docker ps that your container is up and serving port 8181:

docker ps
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS              PORTS                                            NAMES
692219e23bf2        user/mycroft                                    "/mycroft/ai/mycro..."   3 seconds ago       Up 1 second         8181/tcp                                         amazing_borg

CLI Access

You can interact with the CLI of the container by running the following command, this will connect you to the running container via bash:

docker exec -it container_name /bin/bash

You can exit this container safely and leave it running by hitting cntrl + p + q, otherwise you can just hit cntrl+c to exit the cli and it will exit the container. If you exit with cntrl + p + q it will leave the session open and running, still seeing issues attaching to sessions with previously running cli sessions though, so be advised.

You can get the container name via:

docker ps
Quickly start, stop or restart Mycroft's esential services in detached screens

usage: /mycroft/ai/ [-h] (start [-v|-c]|stop|restart)
      -h             this help message
      start          starts mycroft-service, mycroft-skills, mycroft-voice and mycroft-cli in quiet mode
      start -v       starts mycroft-service, mycroft-skills and mycroft-voice
      start -c       starts mycroft-service, mycroft-skills and mycroft-cli in background
      start -d       starts mycroft-service and mycroft skills in quiet mode and an active mycroft-cli
      stop           stops mycroft-service, mycroft-skills and mycroft-voice
      restart        restarts mycroft-service, mycroft-skills and mycroft-voice

screen tips:
            run 'screen -list' to see all running screens
            run 'screen -r <screen-name>' (e.g. 'screen -r mycroft-service') to reatach a screen
            press ctrl + a, ctrl + d to detace the screen again
            See the screen man page for more details
Docker Pull Command
Source Repository

Comments (3)
9 months ago

building image ended with this

Cloning into 'pocketsphinx-python'...
Submodule 'pocketsphinx' ( registered for path 'pocketsphinx'
Submodule 'sphinxbase' ( registered for path 'sphinxbase'
Cloning into 'pocketsphinx'...
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Clone of '' into submodule path 'pocketsphinx' failed
The command '/bin/sh -c sed -i 's/# (.multiverse$)/\1/g' /etc/apt/sources.list && apt-get update && apt-get -y upgrade && apt-get install -y build-essential && apt-get install -y software-properties-common && apt-get install -y byobu curl git htop man unzip vim wget && apt-get install -y python python-dev python-pip && apt-get install -y libtool autoconf bison swig alsa-utils && apt-get install -y libglib2.0-dev portaudio19-dev mpg123 espeak supervisor && apt-get install -y libffi6 libffi-dev libssl-dev && rm -rf /var/lib/apt/lists/ && mkdir /mycroft && TOP=/mycroft && cd /mycroft && git clone --recursive && cd /mycroft/pocketsphinx-python/sphinxbase && ./ && ./configure && make && cd /mycroft/pocketsphinx-python/pocketsphinx && ./ && ./configure && make && cd ../../ && cd /mycroft && cd /mycroft/pocketsphinx-python && python install && cd ../ && cd /mycroft && git clone /mycroft/ai/ && cd /mycroft/ai && easy_install pip==7.1.2 && pip install -r requirements.txt --trusted-host && pip install supervisor && ./scripts/' returned a non-zero code: 1

9 months ago

@mogupta you need to run as a privileged container, as well as have the relevant ALSA libs installed on your host machine. That will fix the error that you are getting

a year ago

I am not able to run the voice service. I see the the voice process running on supervisorctl but I see the following errors in the logs

ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM dmix
Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/lib/python2.7/", line 810, in bootstrap_inner
File "/mycroft/ai/mycroft/client/speech/", line 60, in run
with self.mic as source:
File "/mycroft/ai/mycroft/client/speech/", line 97, in
input=True, # stream is an input stream
File "/usr/local/lib/python2.7/dist-packages/", line 747, in open
stream = Stream(self, args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/", line 442, in
self._stream =**arguments)
IOError: [Errno Invalid input device (no default output device)] -9996