clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Mycroft AI on clear linux #261

Open Thisuu opened 5 years ago

Thisuu commented 5 years ago

Hi, I tried setting up Mycroft-core on Clear Linux, but some dependencies (libffi-dev, libfann, swig etc.) require us to grab the whole bundles for os-core-dev, machine-learning-basic, and few dependencies were missing.

A seperate package with the mycroft-core with CL optimizations would be awesome!

Or can we have a mycroft-support bundle with the necessary packages to build the core?

Thanks!

PS: required dependencies are listed in https://github.com/MycroftAI/mycroft-core/blob/dev/dev_setup.sh, also at this aur for archlinux. (missing virtualenvwrapper,portaudio19-dev,pygobject-dev,mimic )

fenrus75 commented 5 years ago

I made a mycroft-core package

still need to figure out how to put this into bundles in a sensible way

On Fri, Nov 2, 2018 at 10:00 PM Thisara Kasun notifications@github.com wrote:

Hi, I tried setting up Mycroft-core https://github.com/mycroftai/mycroft-core on Clear Linux, but some dependencies (libffi-dev, libfann, swig etc.) require us to grab the whole bundles for os-core-dev, machine-learning-basic, and few dependencies were missing.

A seperate package with the mycroft-core with CL optimizations would be awesome!

Or can we have a mycroft-support bundle with the necessary packages to build the core?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/261, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPeFQGQWOw8X2Fxi7MEJlg4EVA3S8HFks5urSLsgaJpZM4YMo7l .

Thisuu commented 5 years ago

Thanks for looking into it :)

Thisuu commented 5 years ago

@fenrus75 There's a blog post by @antlarr here on how they managed to package Mycroft in Opensuse,if it helps. their patch set is here, though I'm not sure if they're upstreamed by now.

antlarr commented 5 years ago

Thanks for the mention to notify me of this conversation. Precisely in the last few days I've been updating the packages (and patches) for the latest mycroft-core version and I plan to write an updated blog entry after it's released with new (easier) instructions. BTW, please note that during the time since that blog entry, mycroft-core was added as an official package for openSUSE Tumbleweed, so the place it's developed was changed to the official multimedia:voice-assistant obs project.

About the patches, they haven't been upstreamed yet because the code changed lately, but once I finish preparing this update and rebasing the patches, I plan to submit them.

Of course, if I can help somehow, don't hesitate to ask. It would be great to keep packaging as similar as possible between distributions.

nazar2sfive commented 4 years ago
android@clr~ $ git clone https://github.com/MycroftAI/mycroft-core.git
Cloning into 'mycroft-core'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 548934 (delta 5), reused 8 (delta 3), pack-reused 548914
Receiving objects: 100% (548934/548934), 114.54 MiB | 3.75 MiB/s, done.
Resolving deltas: 100% (540492/540492), done.
android@clr~ $ cd mycroft-core/
android@clr~/mycroft-core $ bash dev_setup.sh

                    Welcome to Mycroft!  

This script is designed to make working with Mycroft easy.  During this
first run of dev_setup we will ask you a few questions to help setup
your environment.

Do you want to run on 'master' or against a dev branch?  Unless you are
a developer modifying mycroft-core itself, you should run on the
'master' branch.  It is updated bi-weekly with a stable release.
  Y)es, run on the stable 'master' branch
  N)o, I want to run unstable branches
Choice [Y/N]:  Y - using 'master' branch 
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to a new branch 'master'

Mycroft is actively developed and constantly evolving.  It is recommended
that you update regularly.  Would you like to automatically update
whenever launching Mycroft?  This is highly recommended, especially for
those running against the 'master' branch.
  Y)es, automatically check for updates
  N)o, I will be responsible for keeping Mycroft updated.
Choice [Y/N]:  Y - update automatically 

Mycroft uses its Mimic technology to speak to you.  Mimic can run both
locally and from a server.  The local Mimic is more robotic, but always
available regardless of network connectivity.  It will act as a fallback
if unable to contact the Mimic server.

However, building the local Mimic is time consuming -- it can take hours
on slower machines.  This can be skipped, but Mycroft will be unable to
talk if you lose network connectivity.  Would you like to build Mimic
locally?
Choice [Y/N]:  N - skip Mimic build 

There are several Mycroft helper commands in the bin folder.  These
can be added to your system PATH, making it simpler to use Mycroft.
Would you like this to be added to your PATH in the .profile?
Choice [Y/N]:  Y - Adding Mycroft commands to your PATH 
Type mycroft-help to see available commands.

The standard location for Mycroft skills is under /opt/mycroft/skills.
This script will create that folder for you.  This requires sudo
permission and might ask you for a password...
Password: 
Created!
For convenience, a soft link has been created called 'skills' which leads
to /opt/mycroft/skills.

(Developer) Do you want to automatically check code-style when submitting code.
If unsure answer yes.

Choice [Y/N]: Will install PEP8 pre-commit hook...

Interactive portion complete, now installing dependencies...

Installing packages...

Could not find package manager
Make sure to manually install: git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq

Warning: Failed to install all dependencies. Continue? y/N
nandroid@clr~/mycroft-core $ sudo swupd bundle-add git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq
Loading required manifests...
Warning: Bundle "autoconf" is invalid, skipping it...
Warning: Bundle "bison" is already installed, skipping it...
Warning: Bundle "curl" is already installed, skipping it...
Warning: Bundle "fann" is invalid, skipping it...
Warning: Bundle "g++" is invalid, skipping it...
Warning: Bundle "git" is already installed, skipping it...
Warning: Bundle "glib2.0" is invalid, skipping it...
Warning: Bundle "libffi" is invalid, skipping it...
Warning: Bundle "libjpg" is invalid, skipping it...
Warning: Bundle "libtool" is invalid, skipping it...
Warning: Bundle "openssl" is already installed, skipping it...
Warning: Bundle "portaudio19" is invalid, skipping it...
Warning: Bundle "pygobject" is already installed, skipping it...
Warning: Bundle "python-setuptools" is invalid, skipping it...
Warning: Bundle "python-venv" is invalid, skipping it...
Warning: Bundle "python3" is invalid, skipping it...
Warning: Bundle "swig" is invalid, skipping it...
Downloading packs (1.90 MB) for:
 - flac
 - jq
 - mpg123
 [100%]

Finishing packs extraction...
Validate downloaded files
 [100%]

No extra files need to be downloaded
 [100%]

Installing files...
 [100%]

Calling post-update helper scripts
Failed to install 12 of 15 bundles
5 bundles were already installed
android@clr~/mycroft-core $ bash dev_setup.sh
Installing packages...

Could not find package manager
Make sure to manually install: git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq

Warning: Failed to install all dependencies. Continue? y/N
nandroid@clr~/mycroft-core $ bash dev_setup.sh
Installing packages...

Could not find package manager
Make sure to manually install: git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq

Warning: Failed to install all dependencies. Continue? y/N
y
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1764k  100 1764k    0     0   780k      0  0:00:02  0:00:02 --:--:--  781k
Collecting pip==20.0.2
  Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 308 kB/s 
Collecting setuptools
  Downloading setuptools-46.1.3-py3-none-any.whl (582 kB)
     |████████████████████████████████| 582 kB 3.2 MB/s 
Collecting wheel
  Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-20.0.2 setuptools-46.1.3 wheel-0.34.2
grep: ./.git/hooks/pre-commit: No such file or directory
Adding mycroft-core to virtualenv path
Collecting six==1.13.0
  Downloading six-1.13.0-py2.py3-none-any.whl (10 kB)
Collecting requests==2.20.0
  Downloading requests-2.20.0-py2.py3-none-any.whl (60 kB)
     |████████████████████████████████| 60 kB 271 kB/s 
Collecting gTTS==2.0.4
  Downloading gTTS-2.0.4-py3-none-any.whl (23 kB)
Collecting PyAudio==0.2.11
  Downloading PyAudio-0.2.11.tar.gz (37 kB)
Collecting pyee==5.0.0
  Downloading pyee-5.0.0-py2.py3-none-any.whl (5.3 kB)
Collecting SpeechRecognition==3.8.1
  Downloading SpeechRecognition-3.8.1-py2.py3-none-any.whl (32.8 MB)
     |████████████████████████████████| 32.8 MB 92 kB/s 
Collecting tornado==6.0.3
  Downloading tornado-6.0.3.tar.gz (482 kB)
     |████████████████████████████████| 482 kB 3.9 MB/s 
Collecting websocket-client==0.54.0
  Downloading websocket_client-0.54.0-py2.py3-none-any.whl (200 kB)
     |████████████████████████████████| 200 kB 5.5 MB/s 
Collecting requests-futures==0.9.5
  Downloading requests-futures-0.9.5.tar.gz (5.3 kB)
Collecting pyalsaaudio==0.8.2
  Downloading pyalsaaudio-0.8.2.tar.gz (212 kB)
     |████████████████████████████████| 212 kB 6.2 MB/s 
Collecting xmlrunner==1.7.7
  Downloading xmlrunner-1.7.7.tar.gz (5.6 kB)
Collecting pyserial==3.0
  Downloading pyserial-3.0.tar.gz (133 kB)
     |████████████████████████████████| 133 kB 4.8 MB/s 
Collecting psutil==5.2.1
  Downloading psutil-5.2.1.tar.gz (347 kB)
     |████████████████████████████████| 347 kB 5.3 MB/s 
Collecting pocketsphinx==0.1.0
  Downloading pocketsphinx-0.1.0.tar.gz (503 kB)
     |████████████████████████████████| 503 kB 5.2 MB/s 
Collecting inflection==0.3.1
  Downloading inflection-0.3.1.tar.gz (8.7 kB)
Collecting pillow==6.2.1
  Downloading Pillow-6.2.1-cp38-cp38-manylinux1_x86_64.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 6.2 MB/s 
Collecting python-dateutil==2.6.0
  Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194 kB)
     |████████████████████████████████| 194 kB 5.6 MB/s 
Collecting pychromecast==3.2.2
  Downloading PyChromecast-3.2.2-py2.py3-none-any.whl (45 kB)
     |████████████████████████████████| 45 kB 587 kB/s 
Collecting python-vlc==1.1.2
  Downloading python-vlc-1.1.2.tar.gz (201 kB)
     |████████████████████████████████| 201 kB 4.7 MB/s 
Collecting google-api-python-client==1.6.4
  Downloading google_api_python_client-1.6.4-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 467 kB/s 
Collecting fasteners==0.14.1
  Downloading fasteners-0.14.1-py2.py3-none-any.whl (20 kB)
Collecting PyYAML==5.1.2
  Downloading PyYAML-5.1.2.tar.gz (265 kB)
     |████████████████████████████████| 265 kB 5.8 MB/s 
Collecting lingua-franca==0.2.0
  Downloading lingua_franca-0.2.0-py3-none-any.whl (393 kB)
     |████████████████████████████████| 393 kB 6.7 MB/s 
Collecting msm==0.8.7
  Downloading msm-0.8.7.tar.gz (19 kB)
Collecting msk==0.3.14
  Downloading msk-0.3.14.tar.gz (31 kB)
Collecting adapt-parser==0.3.4
  Downloading adapt-parser-0.3.4.tar.gz (16 kB)
Collecting padatious==0.4.6
  Downloading padatious-0.4.6.tar.gz (12 kB)
Collecting fann2==1.0.7
  Downloading fann2-1.0.7.tar.gz (63 kB)
     |████████████████████████████████| 63 kB 414 kB/s 
    ERROR: Command errored out with exit status 1:
     command: /home/android/mycroft-core/.venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cmy_ss4b/fann2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cmy_ss4b/fann2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-cmy_ss4b/fann2/pip-egg-info
         cwd: /tmp/pip-install-cmy_ss4b/fann2/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-cmy_ss4b/fann2/setup.py", line 65, in <module>
        build_swig()
      File "/tmp/pip-install-cmy_ss4b/fann2/setup.py", line 60, in build_swig
        swig_bin = find_swig()
      File "/tmp/pip-install-cmy_ss4b/fann2/setup.py", line 55, in find_swig
        raise Exception("Couldn't find swig2.0 binary!")
    Exception: Couldn't find swig2.0 binary!
    running swig
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Warning: Failed to install all requirements. Continue? y/N
android@clr~/mycroft-core $ 
ahkok commented 4 years ago

swig2.0 is an older version, we only ship swig version 3.0.x

Erudition commented 2 years ago

Same issue on Guix, where we only have 4.0.2 https://guix.gnu.org/packages/swig-4.0.2/