Getting Started in Ubuntu - Development Environment

It works now. I just restarted my Ubuntu ^^.

So, the procedure :

cd <path_to_mycroft_repo>/mycroft ./build_host_setup.sh sudo apt-get install curl espeak libssl-dev ./dev_setup.sh

Restart your OS and then

cd <path_to_mycroft_repo>/mycroft workon mycroft

:sunny:

1 Like

Oh yes, I’ve ran into this every time I have set stuff up. That is going into the README.

Hey thanks! I ran into that probem too. I have been too busy lately to get a chance to trouble shoot it. That was the first issue I ran into.

I had a question, after compilation and set up how do we interface with the AI? Do we start with the terminal badh shell? Or does it automaticly respond to voice commands? If I were to put in the IP of my virtual machine (ubuntu) into a web browser, would I bee able to go to a simple web page to login and setup / configure the system? Do you have any videos of how you bring up the servies and interface while you are testing your system?

Open 3 terminals in the Mycroft checkout dir:
Terminal 1
./start.sh service
Terminal 2
./start.sh skills
Terminal 3
./start.sh voice

If you want them to background in one terminal use &;
./start.sh service &

Expect this to get better :wink:

1 Like

after those services are started, can you enter questions to it via text in a bash shell? or does it have to be through voice activation only?

@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