ahodges9 / LedFx

LedFx is a network based LED effect controller with support for advanced real-time audio effects! LedFx can control multiple devices and works great with cheap ESP8266 nodes allowing for cost effectvice syncronized effects across your entire house!
MIT License
384 stars 91 forks source link

Environment Build Changes #168

Closed shauneccles closed 3 years ago

shauneccles commented 3 years ago

Bit of tidying up - changes to req.txt, setup.py and the creation of what hopefully becomes a one line install script for people who want to be on the bleeding edge.

Also contains activate.ps1 for people using python venvs within vs code - means all you gotta do is type activate.ps1 into the console and it activates the venv.

THATDONFC commented 3 years ago

I don't think we should be using sudo with pip for this installer. It might be good to create a virtual environment with a symlink to a script that "activates" the venv and launches LedFx.

For the install:

python3 -m venv ~/ledfx-venv
export PATH=$PATH:$HOME/ledfx-venv/bin
...install ledfx here

Script to launch LedFx:

#!/usr/bin/env bash
export PATH=$PATH:$HOME/ledfx-venv/bin
ledfx

Or, install in the user environment:

...
pip install --user -r requirements.txt
python3 ~/ledfx-workdir/LedFx/setup.py build
python3 ~/ledfx-workdir/LedFx/setup.py install
shauneccles commented 3 years ago

Ready for merge - installs for the user who calls install.sh.

Install instructions are simply;

curl -sSL https://install.ledfx.app | bash

shauneccles commented 3 years ago

This also changes the default bind address to 0.0.0.0 - fixes docker issues and fixes issues on Raspberry Pi's (if binding to 127.0.0.1 it won't listen on external adaptors)

THATDONFC commented 3 years ago

I just did a fresh install on a pi zero and needed to change the following to work:

sudo apt-get install -y gcc \
        git \
        libatlas3-base \
        libavformat58 \
        portaudio19-dev \
        pulseaudio \
        python3-pip

It would be great to get a few more tests on this install script