Giter Site home page Giter Site logo

Comments (9)

mtlynch avatar mtlynch commented on July 24, 2024

Thanks for reporting this, @KuroSaru and sorry for the issues. Would you be able to share a gist with the output when you run the install command?

curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | bash -

from tinypilot.

KuroSaru avatar KuroSaru commented on July 24, 2024

So i fixed my issues manually. But i will run script to get output still as now i know my issue.

  1. CORS was blocking sending inputs
  2. Had to manually insatll the usb-gadget service no idea why it wasn't created.

Output:

pi@frank:/opt $ curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | bash -
+ set -e
+ set -u
+ '[' -f /etc/nginx/sites-enabled/KVMPi.conf ']'
++ mktemp -d
+ pushd /tmp/tmp.IYXuNiY6bZ
/tmp/tmp.IYXuNiY6bZ /opt
+ sudo apt-get install -y python3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-venv is already the newest version (3.7.3-1).
The following package was automatically installed and is no longer required:
  rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ python3 -m venv venv
+ . venv/bin/activate
++ deactivate nondestructive
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /bin/bash -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/tmp/tmp.IYXuNiY6bZ/venv
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
++ PATH=/tmp/tmp.IYXuNiY6bZ/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ '[' 'x(venv) ' '!=' x ']'
++ PS1='(venv) '
++ export PS1
++ '[' -n /bin/bash -o -n '' ']'
++ hash -r
+ pip install ansible==2.9.10
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting ansible==2.9.10
  Using cached https://files.pythonhosted.org/packages/03/4f/cccab1ec2e0ecb05120184088e00404b38854809cf35aa76889406fbcbad/ansible-2.9.10.tar.gz
Collecting PyYAML (from ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz
Collecting cryptography (from ansible==2.9.10)
Collecting jinja2 (from ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
Collecting six>=1.4.1 (from cryptography->ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography->ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz
Collecting MarkupSafe>=0.23 (from jinja2->ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography->ansible==2.9.10)
  Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
Building wheels for collected packages: ansible, PyYAML, cffi, MarkupSafe
  Running setup.py bdist_wheel for ansible ... error
  Complete output from command /tmp/tmp.IYXuNiY6bZ/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y_li2r_p/ansible/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-xdizewp_ --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for ansible
  Running setup.py clean for ansible
  Running setup.py bdist_wheel for PyYAML ... error
  Complete output from command /tmp/tmp.IYXuNiY6bZ/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y_li2r_p/PyYAML/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-o2cug9pg --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for PyYAML
  Running setup.py clean for PyYAML
  Running setup.py bdist_wheel for cffi ... error
  Complete output from command /tmp/tmp.IYXuNiY6bZ/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y_li2r_p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-it0oc90j --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for cffi
  Running setup.py clean for cffi
  Running setup.py bdist_wheel for MarkupSafe ... error
  Complete output from command /tmp/tmp.IYXuNiY6bZ/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y_li2r_p/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-qf47vwiv --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for MarkupSafe
  Running setup.py clean for MarkupSafe
Failed to build ansible PyYAML cffi MarkupSafe
Installing collected packages: PyYAML, six, pycparser, cffi, cryptography, MarkupSafe, jinja2, ansible
  Running setup.py install for PyYAML ... done
  Running setup.py install for cffi ... done
  Running setup.py install for MarkupSafe ... done
  Running setup.py install for ansible ... done
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.9.10 cffi-1.14.0 cryptography-3.0 jinja2-2.11.2 pycparser-2.20 six-1.15.0
+ echo '[defaults]
roles_path = /tmp/tmp.IYXuNiY6bZ
'
+ ansible-galaxy install mtlynch.tinypilot
- downloading role 'tinypilot', owned by mtlynch
- downloading role from https://github.com/mtlynch/ansible-role-tinypilot/archive/master.tar.gz
- extracting mtlynch.tinypilot to /tmp/tmp.IYXuNiY6bZ/mtlynch.tinypilot
- mtlynch.tinypilot (master) was installed successfully
- adding dependency: mtlynch.ustreamer
- adding dependency: geerlingguy.nginx
- downloading role 'ustreamer', owned by mtlynch
- downloading role from https://github.com/mtlynch/ansible-role-ustreamer/archive/master.tar.gz
- extracting mtlynch.ustreamer to /tmp/tmp.IYXuNiY6bZ/mtlynch.ustreamer
- mtlynch.ustreamer (master) was installed successfully
- downloading role 'nginx', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role-nginx/archive/2.8.0.tar.gz
- extracting geerlingguy.nginx to /tmp/tmp.IYXuNiY6bZ/geerlingguy.nginx
- geerlingguy.nginx (2.8.0) was installed successfully
+ echo '- hosts: localhost
  connection: local
  become: true
  become_method: sudo
  roles:
    - role: mtlynch.tinypilot'
+ ansible-playbook -i localhost, install.yml

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
[WARNING]: Platform linux on host localhost is using the discovered Python
interpreter at /usr/bin/python, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.9/referen
ce_appendices/interpreter_discovery.html for more information.
ok: [localhost]

TASK [mtlynch.ustreamer : collect universal required apt packages] *************
ok: [localhost]

TASK [mtlynch.ustreamer : collect Raspberry Pi OS specific required apt packages] ***
skipping: [localhost]

TASK [mtlynch.ustreamer : collect Debian-specific required apt packages] *******
ok: [localhost]

TASK [mtlynch.ustreamer : collect Ubuntu-specific required apt packages] *******
skipping: [localhost]

TASK [mtlynch.ustreamer : install uStreamer pre-requisite packages] ************
ok: [localhost]

TASK [mtlynch.ustreamer : create ustreamer group] ******************************
ok: [localhost]

TASK [mtlynch.ustreamer : create ustreamer user] *******************************
ok: [localhost]

TASK [mtlynch.ustreamer : create uStreamer folder] *****************************
ok: [localhost]

TASK [mtlynch.ustreamer : get uStreamer repo] **********************************
ok: [localhost]

TASK [mtlynch.ustreamer : clean repository if needed] **************************
skipping: [localhost]

TASK [mtlynch.ustreamer : enable OpenMax IL acceleration on Pi OS] *************
ok: [localhost]

TASK [mtlynch.ustreamer : build uStreamer] *************************************
ok: [localhost]

TASK [mtlynch.ustreamer : fix uStreamer folder permissions] ********************
ok: [localhost]

TASK [mtlynch.ustreamer : install uStreamer as a service] **********************
ok: [localhost]

TASK [mtlynch.ustreamer : enable systemd uStreamer service file] ***************
ok: [localhost]

TASK [geerlingguy.nginx : Include OS-specific variables.] **********************
ok: [localhost]

TASK [geerlingguy.nginx : Define nginx_user.] **********************************
ok: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
skipping: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
skipping: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
included: /tmp/tmp.IYXuNiY6bZ/geerlingguy.nginx/tasks/setup-Debian.yml for localhost

TASK [geerlingguy.nginx : Update apt cache.] ***********************************
ok: [localhost]

TASK [geerlingguy.nginx : Ensure nginx is installed.] **************************
ok: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
skipping: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
skipping: [localhost]

TASK [geerlingguy.nginx : include_tasks] ***************************************
skipping: [localhost]

TASK [geerlingguy.nginx : Remove default nginx vhost config file (if configured).] ***
ok: [localhost]

TASK [geerlingguy.nginx : Ensure nginx_vhost_path exists.] *********************
ok: [localhost]

TASK [geerlingguy.nginx : Add managed vhost config files.] *********************
ok: [localhost] => (item={'listen': '80 default_server', 'server_name': 'tinypilot', 'root': '/opt/tinypilot', 'index': 'index.html', 'extra_parameters': 'proxy_set_header Host $host;\nproxy_set_header X-Forwarded-For $remote_addr;\nproxy_http_version 1.1;\n\nlocation /socket.io {\n  proxy_pass http://localhost:8000;\n  proxy_set_header Upgrade $http_upgrade;\n  proxy_set_header Connection "Upgrade";\n}\nlocation /state {\n  proxy_pass http://localhost:8001;\n}\nlocation /stream {\n  proxy_pass http://localhost:8001;\n}\nlocation / {\n  proxy_pass http://localhost:8000;\n}\nlocation ~* ^/.+\\.(html|js|js.map|css|jpeg|png|ico)$ {\n  root "/opt/tinypilot/app/static";\n}\n'})

TASK [geerlingguy.nginx : Remove managed vhost config files.] ******************
skipping: [localhost] => (item={'listen': '80 default_server', 'server_name': 'tinypilot', 'root': '/opt/tinypilot', 'index': 'index.html', 'extra_parameters': 'proxy_set_header Host $host;\nproxy_set_header X-Forwarded-For $remote_addr;\nproxy_http_version 1.1;\n\nlocation /socket.io {\n  proxy_pass http://localhost:8000;\n  proxy_set_header Upgrade $http_upgrade;\n  proxy_set_header Connection "Upgrade";\n}\nlocation /state {\n  proxy_pass http://localhost:8001;\n}\nlocation /stream {\n  proxy_pass http://localhost:8001;\n}\nlocation / {\n  proxy_pass http://localhost:8000;\n}\nlocation ~* ^/.+\\.(html|js|js.map|css|jpeg|png|ico)$ {\n  root "/opt/tinypilot/app/static";\n}\n'})

TASK [geerlingguy.nginx : Remove legacy vhosts.conf file.] *********************
ok: [localhost]

TASK [geerlingguy.nginx : Copy nginx configuration in place.] ******************
ok: [localhost]

TASK [geerlingguy.nginx : Ensure nginx service is running as configured.] ******
ok: [localhost]

TASK [mtlynch.tinypilot : enable dwc2 driver in boot config] *******************
skipping: [localhost]

TASK [mtlynch.tinypilot : enable dwc2 driver in modules] ***********************
skipping: [localhost]

TASK [mtlynch.tinypilot : copy HID initializer script] *************************
skipping: [localhost]

TASK [mtlynch.tinypilot : install HID initializer as a service] ****************
skipping: [localhost]

TASK [mtlynch.tinypilot : enable systemd HID initializer service file] *********
skipping: [localhost]

TASK [mtlynch.tinypilot : install TinyPilot pre-requisite packages] ************
ok: [localhost]

TASK [mtlynch.tinypilot : create tinypilot group] ******************************
ok: [localhost]

TASK [mtlynch.tinypilot : create tinypilot user] *******************************
ok: [localhost]

TASK [mtlynch.tinypilot : enable passwordless sudo for shutdown command] *******
ok: [localhost]

TASK [mtlynch.tinypilot : create TinyPilot folder] *****************************
changed: [localhost]

TASK [mtlynch.tinypilot : get TinyPilot repo] **********************************
changed: [localhost]

TASK [mtlynch.tinypilot : create TinyPilot virtualenv] *************************
changed: [localhost]

TASK [mtlynch.tinypilot : fix TinyPilot folder permissions] ********************
ok: [localhost]

TASK [mtlynch.tinypilot : install TinyPilot as a service] **********************
changed: [localhost]

TASK [mtlynch.tinypilot : enable systemd TinyPilot service file] ***************
ok: [localhost]

RUNNING HANDLER [mtlynch.tinypilot : reload TinyPilot systemd config] **********
ok: [localhost]

RUNNING HANDLER [mtlynch.tinypilot : restart TinyPilot service] ****************
changed: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=36   changed=5    unreachable=0    failed=0    skipped=14   rescued=0    ignored=0

from tinypilot.

mtlynch avatar mtlynch commented on July 24, 2024

CORS was blocking sending inputs

Ah, right! It assumes the hostname is tinypilot. I'll fix that.

Had to manually insatll the usb-gadget service no idea why it wasn't created.

Oh, that's strange. Did the install script report any errors the first time you ran it?

from tinypilot.

KuroSaru avatar KuroSaru commented on July 24, 2024

Had to manually insatll the usb-gadget service no idea why it wasn't created.

Oh, that's strange. Did the install script report any errors the first time you ran it?

Sadly it did not. only thing it said as shown above skipping. I checked for /opt/enable-rpi-hid and /lib/systemd/system/usb-gadget.service neither were created. Might be because im using the raspberrypi OS 64bit beta? and scripts didn't detect it correctly.

from tinypilot.

mtlynch avatar mtlynch commented on July 24, 2024

Might be because im using the raspberrypi OS 64bit beta? and scripts didn't detect it correctly.

Oh, that's likely it. I haven't tested on 64-bit yet, so I think you're the first to do this!

But given that you got it by installing manually, I should be able to get it working with some small adjustments to the Ansible script to correct for whatever it's missing.

My guess is that the Ansible architecture shows up as something that doesn't start with armv on Pi 64. Is it aarch64?

https://github.com/mtlynch/ansible-role-tinypilot/blob/5329a9b5fd18c7254f2b654c462ac9026c831204/tasks/main.yml#L4

from tinypilot.

KuroSaru avatar KuroSaru commented on July 24, 2024

Yeah it is aarch64.
Sidenote: also had to manually run

sudo apt-get install libffi-dev

from tinypilot.

mtlynch avatar mtlynch commented on July 24, 2024

Ah, thanks for the note. I created a separate bug to track 64-bit compatibility:

tiny-pilot/ansible-role-tinypilot#19

from tinypilot.

bgulla avatar bgulla commented on July 24, 2024

Yeah it is aarch64.
Sidenote: also had to manually run

sudo apt-get install libffi-dev

I am having the same problem that you are. In addition to the libffi-dev install, what exactly did you have to enable to get the usb-gadget working? I am seeing inypilot enable-rpi-hid[795]: /opt/enable-rpi-hid: line 30: echo: write error: Device or resource busy.

from tinypilot.

KuroSaru avatar KuroSaru commented on July 24, 2024

Yeah it is aarch64.
Sidenote: also had to manually run

sudo apt-get install libffi-dev

I am having the same problem that you are. In addition to the libffi-dev install, what exactly did you have to enable to get the usb-gadget working? I am seeing inypilot enable-rpi-hid[795]: /opt/enable-rpi-hid: line 30: echo: write error: Device or resource busy.

You have to install the usb-gadget manually. Generally was adding the service manually. I think the author has a patch for that now or is working on it. As the deploy script for the usb-gadget never triggered on arm64 builds.

from tinypilot.

Related Issues (20)

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.