Getting Started in Ubuntu - Development Environment

@aatchison That’s exactly what I did and my first request was “Mycroft, tell me a joke”. I was not disappointed. :smile:
It made me laugh :grin:

Good question, I also wander how to interact with Skills without using the voice ?

There is also:
./start.sh cli --quiet

1 Like

ok cool thanks, i will have to check that out once i get some more time on my hands.

Sorry to appear absolutely clueless (which I am) but what is meant by the Mycroft ‘checkout’ directory?
:confused:

The checkout directory is just the folder where you downloaded mycroft-core. :slight_smile:

ah, thanks, makes sense I guess cheers!

I resolved this with help from the Slack channel. I had setup the environment as sudo. I re-ran dev_setup.sh as my normal user and this fixed everything.

How can I resolve the error ImportError: cannot import name WebSocketApp?

Here’s a working Dockerfile for setting up the mycroft-core development environment, in case there’s any other non-Ubuntu users interested. It’s tested with Fedora 23 as the host OS but should work with Mac OS or any Linux distribution.

FROM ubuntu:14.04

# Add mycroft-core dependencies from build_host_setup.sh and curl
RUN apt-get update
RUN sudo apt-get install -y \
    git \
    python \
    python-dev \
    python-virtualenv \
    python-gobject-dev \
    virtualenvwrapper \
    libtool \
    libffi-dev \
    libssl-dev \
    autoconf \
    bison \
    swig \
    libglib2.0-dev \
    s3cmd \
    portaudio19-dev \
    mpg123 \
    curl

RUN sudo easy_install --upgrade virtualenv

# Get Mycroft Core
RUN git clone https://github.com/MycroftAI/mycroft-core.git

# Make non-root user in container
RUN useradd mycroft -d /mycroft-core && chown -R mycroft /mycroft-core
USER mycroft

# Run dev_setup script as non-root user
WORKDIR mycroft-core
RUN ./dev_setup.sh
2 Likes

Awesome!
I’m going to try this ASAP, thanks!

Great job @Marxau - another community member worked on a Docker file too, but it is still based on the old repo (before we opened up to everyone).

I’ll open it up if you want to head over to it and hit it with a PR.

@Marxau here it is: https://github.com/MycroftAI/docker-mycroft

Let’s get it up-to-date! Great work!

I only have time to skim this until I get home, but it looks like the pre-existing dockerfile doesn’t use a python virtualenv. I seriously considered going that route (since container in a container is a bit silly) but decided for the sake of guaranteed compatibility and ease of maintenance to keep it.

If you guys think that having virtualenv + docker works I’ll submit the pull request. Otherwise I can tweak the existing dockerfile, but it might occasionally need to be updated if stuff changes w.r.t. the virtualenv settings.

In terms of skills I’m working on a pair of skills for the Wemo smart switch and motion sensor building on the excellent open source Ouimeaux controller project.

1 Like

@Marxau I’m very excited to be able to control Wemo. I think that whatever is best for managing the Docker instance, and making it easy to use is probably the best way to go in regards to Virtualenvs. I’m really going to leave this up to you and @paulscott56’s discretion.

I have Mycroft working just fine on a Raspberry 2 running Raspian Jessie-lite. However, I’m having trouble getting Mycroft to connect to UART. I’ve disabled the login console for the pi using raspi-config. Here’s the error message : EnclosureClient - ERROR - It is not possible to connect to serial port: /dev/ttyAMA0. Is there another process using the serial port that I should be disabling? I’ve already tried stopping getty from using the port but to no avail. Can anyone point me in the right direction? I figured I’d take a stab at creating a custom face display for Mycroft.

Hi Gustavo!

(I thought I’d post this reply to your other thread here.)

First of all, does the /dev/ttyAMA0 UART exist? I assume that it does.

I’ve had to disable getty this way:
sudo systemctl stop serial-getty@ttyAMA0.service sudo systemctl disable serial-getty@ttyAMA0.service

The user that runs the enclosure code should also be a member of the dialout group.
`sudo usermod -aG dialout USER’

I hope that helps!

I actually used this last night to build mycroft on centOS 7.3 which is my primary linux distor of choice, due to being a linux admin in Enterprise envs. I just found out that there is now a gnome plugin which is awesome!

I cant run that. how do it?

Here is a video showing exactly how to do this: https://www.patreon.com/posts/mycroft-training-13979749

2 Likes