Bug 388032 - How to integrate Plasmoid-mycroft with Mycroft Docker service?
Summary: How to integrate Plasmoid-mycroft with Mycroft Docker service?
Status: RESOLVED NOT A BUG
Alias: None
Product: plasma-mycroft
Classification: Plasma
Component: Plasmoid (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Aditya Mehra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-19 12:55 UTC by stardiviner
Modified: 2017-12-20 06:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-6190-0.html (3.70 KB, text/html)
2017-12-20 01:45 UTC, stardiviner
Details
attachment-22135-0.html (6.17 KB, text/html)
2017-12-20 06:15 UTC, stardiviner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stardiviner 2017-12-19 12:55:21 UTC
I pulled Mycroft docker image. Want to configure plasmoid-mycroft to use docker service.
I set plasmoid-mycroft core path to `ws://0.0.0.0:8181/core`.
And launch mycroft docker image with command:
```
docker run -itd -p 8181:8181 -v ~/.mycroft:/root/.mycroft mycroftai/docker-mycroft
```
Then I execute command:
```
$ docker exec -it "elastic_thompson" /bin/bash
> ./start.sh
```

Then I check out plasmoid-mycroft again, it report yellow message: "Mycroft is disabled"
Comment 1 Aditya Mehra 2017-12-19 19:17:24 UTC
(In reply to stardiviner from comment #0)
> I pulled Mycroft docker image. Want to configure plasmoid-mycroft to use
> docker service.
> I set plasmoid-mycroft core path to `ws://0.0.0.0:8181/core`.
> And launch mycroft docker image with command:
> ```
> docker run -itd -p 8181:8181 -v ~/.mycroft:/root/.mycroft
> mycroftai/docker-mycroft
> ```
> Then I execute command:
> ```
> $ docker exec -it "elastic_thompson" /bin/bash
> > ./start.sh
> ```
> 
> Then I check out plasmoid-mycroft again, it report yellow message: "Mycroft
> is disabled"

Is 0.0.0.0 your docker image's IP address, 0.0.0.0 should be your local system rather than dockers IP address. Have you tried "ip addr" in the docker image itself to get its assigned address ? you might be required to even manually assign the ip for your mycroft-docker image and you should set that ip in the settings area where "ws://0.0.0.0:8181/core" would change to "ws://192.168.1.1:8181/core" (192.168.1.1 as an example, replace by docker IP)

The docker image / mycroft need to be started first before connecting from the plasmoid.
Comment 2 stardiviner 2017-12-20 01:45:03 UTC
Created attachment 109457 [details]
attachment-6190-0.html

​​
You're right, I did need to bind Docker container inside IP (from command
"ip addr") to Plasmoid mycroft. It's connected now. Thanks. BTW, can you
improve Plasmoid mycroft to change the default skills location? Instead of
install in /home/USER, install into ~/.config/plasmoid-mycroft/ or
something similar?


[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Wed, Dec 20, 2017 at 3:17 AM, Aditya Mehra <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=388032
>
> Aditya Mehra <Aix.m@outlook.com> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>          Resolution|---                         |WAITINGFORINFO
>              Status|UNCONFIRMED                 |NEEDSINFO
>
> --- Comment #1 from Aditya Mehra <Aix.m@outlook.com> ---
> (In reply to stardiviner from comment #0)
> > I pulled Mycroft docker image. Want to configure plasmoid-mycroft to use
> > docker service.
> > I set plasmoid-mycroft core path to `ws://0.0.0.0:8181/core`.
> > And launch mycroft docker image with command:
> > ```
> > docker run -itd -p 8181:8181 -v ~/.mycroft:/root/.mycroft
> > mycroftai/docker-mycroft
> > ```
> > Then I execute command:
> > ```
> > $ docker exec -it "elastic_thompson" /bin/bash
> > > ./start.sh
> > ```
> >
> > Then I check out plasmoid-mycroft again, it report yellow message:
> "Mycroft
> > is disabled"
>
> Is 0.0.0.0 your docker image's IP address, 0.0.0.0 should be your local
> system
> rather than dockers IP address. Have you tried "ip addr" in the docker
> image
> itself to get its assigned address ? you might be required to even manually
> assign the ip for your mycroft-docker image and you should set that ip in
> the
> settings area where "ws://0.0.0.0:8181/core" would change to
> "ws://192.168.1.1:8181/core" (192.168.1.1 as an example, replace by
> docker IP)
>
> The docker image / mycroft need to be started first before connecting from
> the
> plasmoid.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Aditya Mehra 2017-12-20 04:59:13 UTC
(In reply to stardiviner from comment #2)
> Created attachment 109457 [details]
> attachment-6190-0.html
> 
> ​​
> You're right, I did need to bind Docker container inside IP (from command
> "ip addr") to Plasmoid mycroft. It's connected now. Thanks. BTW, can you
> improve Plasmoid mycroft to change the default skills location? Instead of
> install in /home/USER, install into ~/.config/plasmoid-mycroft/ or
> something similar?
> 
> 
> [stardiviner]           <Hack this world!>      GPG key ID: 47C32433
> IRC(freeenode): stardiviner                     Twitter:  @numbchild
> Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> Blog: http://stardiviner.github.io/
> 
> On Wed, Dec 20, 2017 at 3:17 AM, Aditya Mehra <bugzilla_noreply@kde.org>
> wrote:
> 
> > https://bugs.kde.org/show_bug.cgi?id=388032
> >
> > Aditya Mehra <Aix.m@outlook.com> changed:
> >
> >            What    |Removed                     |Added
> > ------------------------------------------------------------
> > ----------------
> >          Resolution|---                         |WAITINGFORINFO
> >              Status|UNCONFIRMED                 |NEEDSINFO
> >
> > --- Comment #1 from Aditya Mehra <Aix.m@outlook.com> ---
> > (In reply to stardiviner from comment #0)
> > > I pulled Mycroft docker image. Want to configure plasmoid-mycroft to use
> > > docker service.
> > > I set plasmoid-mycroft core path to `ws://0.0.0.0:8181/core`.
> > > And launch mycroft docker image with command:
> > > ```
> > > docker run -itd -p 8181:8181 -v ~/.mycroft:/root/.mycroft
> > > mycroftai/docker-mycroft
> > > ```
> > > Then I execute command:
> > > ```
> > > $ docker exec -it "elastic_thompson" /bin/bash
> > > > ./start.sh
> > > ```
> > >
> > > Then I check out plasmoid-mycroft again, it report yellow message:
> > "Mycroft
> > > is disabled"
> >
> > Is 0.0.0.0 your docker image's IP address, 0.0.0.0 should be your local
> > system
> > rather than dockers IP address. Have you tried "ip addr" in the docker
> > image
> > itself to get its assigned address ? you might be required to even manually
> > assign the ip for your mycroft-docker image and you should set that ip in
> > the
> > settings area where "ws://0.0.0.0:8181/core" would change to
> > "ws://192.168.1.1:8181/core" (192.168.1.1 as an example, replace by
> > docker IP)
> >
> > The docker image / mycroft need to be started first before connecting from
> > the
> > plasmoid.
> >
> > --
> > You are receiving this mail because:
> > You reported the bug.

Default skill locations are set and controlled by Mycroft, the plasmoid has no control over where your skills are installed, As i understand you are using a docker image for mycroft, you will be required to install the skills in the docker image from msm command line, the plasmoid feature to install skills will not work, Certain plasmoid features are originally meant to support only system installs of mycroft, and there might not be any workarounds to this limitation.
Comment 4 stardiviner 2017-12-20 06:15:54 UTC
Created attachment 109458 [details]
attachment-22135-0.html

Really thanks for your help.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Wed, Dec 20, 2017 at 12:59 PM, Aditya Mehra <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=388032
>
> Aditya Mehra <Aix.m@outlook.com> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>          Resolution|WAITINGFORINFO              |INVALID
>              Status|NEEDSINFO                   |RESOLVED
>
> --- Comment #3 from Aditya Mehra <Aix.m@outlook.com> ---
> (In reply to stardiviner from comment #2)
> > Created attachment 109457 [details]
> > attachment-6190-0.html
> >
> > ​​
> > You're right, I did need to bind Docker container inside IP (from command
> > "ip addr") to Plasmoid mycroft. It's connected now. Thanks. BTW, can you
> > improve Plasmoid mycroft to change the default skills location? Instead
> of
> > install in /home/USER, install into ~/.config/plasmoid-mycroft/ or
> > something similar?
> >
> >
> > [stardiviner]           <Hack this world!>      GPG key ID: 47C32433
> > IRC(freeenode): stardiviner                     Twitter:  @numbchild
> > Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> > Blog: http://stardiviner.github.io/
> >
> > On Wed, Dec 20, 2017 at 3:17 AM, Aditya Mehra <bugzilla_noreply@kde.org>
> > wrote:
> >
> > > https://bugs.kde.org/show_bug.cgi?id=388032
> > >
> > > Aditya Mehra <Aix.m@outlook.com> changed:
> > >
> > >            What    |Removed                     |Added
> > > ------------------------------------------------------------
> > > ----------------
> > >          Resolution|---                         |WAITINGFORINFO
> > >              Status|UNCONFIRMED                 |NEEDSINFO
> > >
> > > --- Comment #1 from Aditya Mehra <Aix.m@outlook.com> ---
> > > (In reply to stardiviner from comment #0)
> > > > I pulled Mycroft docker image. Want to configure plasmoid-mycroft to
> use
> > > > docker service.
> > > > I set plasmoid-mycroft core path to `ws://0.0.0.0:8181/core`.
> > > > And launch mycroft docker image with command:
> > > > ```
> > > > docker run -itd -p 8181:8181 -v ~/.mycroft:/root/.mycroft
> > > > mycroftai/docker-mycroft
> > > > ```
> > > > Then I execute command:
> > > > ```
> > > > $ docker exec -it "elastic_thompson" /bin/bash
> > > > > ./start.sh
> > > > ```
> > > >
> > > > Then I check out plasmoid-mycroft again, it report yellow message:
> > > "Mycroft
> > > > is disabled"
> > >
> > > Is 0.0.0.0 your docker image's IP address, 0.0.0.0 should be your local
> > > system
> > > rather than dockers IP address. Have you tried "ip addr" in the docker
> > > image
> > > itself to get its assigned address ? you might be required to even
> manually
> > > assign the ip for your mycroft-docker image and you should set that ip
> in
> > > the
> > > settings area where "ws://0.0.0.0:8181/core" would change to
> > > "ws://192.168.1.1:8181/core" (192.168.1.1 as an example, replace by
> > > docker IP)
> > >
> > > The docker image / mycroft need to be started first before connecting
> from
> > > the
> > > plasmoid.
> > >
> > > --
> > > You are receiving this mail because:
> > > You reported the bug.
>
> Default skill locations are set and controlled by Mycroft, the plasmoid
> has no
> control over where your skills are installed, As i understand you are
> using a
> docker image for mycroft, you will be required to install the skills in the
> docker image from msm command line, the plasmoid feature to install skills
> will
> not work, Certain plasmoid features are originally meant to support only
> system
> installs of mycroft, and there might not be any workarounds to this
> limitation.
>
> --
> You are receiving this mail because:
> You reported the bug.
>