Code Monkey home page Code Monkey logo

docker-mycroft's Introduction

Mycroft Docker Development Environment

Build Status

Install

Get image from Docker hub

This repo is updated on dockerhub and you can have it without building it, by simply running the below command.

docker pull mycroftai/docker-mycroft

Build image

Git pull this repository.

git clone https://github.com/MycroftAI/docker-mycroft.git

Build the docker image in the directory that you have checked out.

docker build -t mycroft .

Run

To get persistent data and don't have, for example, to pair our instance every time the container is started. You can map a local directory into the container. Just replace the directory_on_local_machine with where you want the container mapped on your local machine (eg: /home/user/mycroft).

Sounds can be played in the container using pulseaudio, without modifying any config files (Thanks to fsmunoz).

Run the following to start up mycroft:

docker run -d \
-v directory_on_local_machine:/root/.mycroft \
--device /dev/snd \
-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
-v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \
-v ~/.config/pulse/cookie:/root/.config/pulse/cookie \
-p 8181:8181 \
--name mycroft mycroftai/docker-mycroft

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

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

You should now have a running instance of mycroft that you can interact with via the cli, etc.

  • For GUI Development: 1- Expose The following ports: ```18180-18189:18180-18189`` 2-Follow either A or B steps. A: Follow the [PR] (MycroftAI/mycroft-core#2106) B: Mount the skills and mycroft folder from the mycroft-core in the container then Link the folders to your host /opt/mycroft

Logs

At any time you can watch the logs simply by running the bellow command:

docker logs -f mycroft

You can exit out of this docker log command by hitting ctrl + c, the --follow basically turns it into a real tail instead of a cat of the log.

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 mycroft /bin/bash

Once in the container you can do ./start-mycroft.sh cli to get a interactive CLI to interact with mycroft if needed.

You can hit ctrl + c to exit the cli.

Pairing Instance

After the container has been started you can watch the logs and look for the line that says Pairing Code and use this to pair at https://home.mycroft.ai.

You can filter the logs to get the pairing code as such:

docker logs mycroft | grep "Pairing code:"

Skills

You can watch the logs and confirm it installs/deletes skills.

Install

You can install skills into the container from outside by running the following:

docker exec -it mycroft /usr/local/bin/msm install github_url

So to install say my basic-skill helper:

docker exec -it mycroft /opt/mycroft/msm/msm install https://github.com/btotharye/mycroft-skill-basichelp

Remove

You can uninstall a skill by removing the folder location for it

docker exec -it mycroft rm -rf /opt/mycroft/skills/mycroft-skill-basichelp

This would remove the above test basic help skill.

docker-mycroft's People

Contributors

allank avatar btotharye avatar christianmurphy avatar forslund avatar ismailsunni avatar keesvanbochove avatar luccoj avatar ndarilek avatar paulscott56 avatar rhelmer avatar s1tl avatar teagan42 avatar thelastproject avatar theonlyfoxy avatar tuchfarber avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.