Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not most recent version of LedFx? #20

Open
luki28 opened this issue Jun 15, 2023 · 7 comments
Open

Not most recent version of LedFx? #20

luki28 opened this issue Jun 15, 2023 · 7 comments

Comments

@luki28
Copy link

luki28 commented Jun 15, 2023

It seems like the docker container does not contain the current version of LedFx. It would be great if you could update it.

Thanks in advance.

@epiller
Copy link

epiller commented Sep 8, 2023

Would be awesome to have the newest version, indeed, but it seems @ShiromMakkad hasn't been here in a while, which is unfortunate.

@ShiromMakkad
Copy link
Owner

I tried running the update script but it failed. I won't have time to dig into it for a little bit.

@luki28 luki28 closed this as completed Sep 20, 2023
@luki28 luki28 reopened this Sep 20, 2023
@luki28
Copy link
Author

luki28 commented Sep 20, 2023

I updated the Dockerfile a while ago, it worked at least for me like this:

FROM python:3.9-buster
WORKDIR /app

RUN pip install Cython
RUN dpkg --add-architecture armhf
RUN apt-get update
RUN apt-get install -y gcc \
                       git \
                       libatlas3-base \
		       libavformat58 \
		       portaudio19-dev \
		       avahi-daemon \
		       pulseaudio
RUN pip install --upgrade pip wheel setuptools
RUN pip install lastversion
RUN pip install numpy
ENV CFLAGS="-I/usr/local/lib/python3.9/site-packages/numpy/core/include $CFLAGS"
RUN pip install aubio
RUN pip install git+https://github.com/LedFx/LedFx

RUN apt-get install -y alsa-utils
RUN adduser root pulse-access

# https://gnanesh.me/avahi-docker-non-root.html
RUN apt-get install -y libnss-mdns
RUN echo '*' > /etc/mdns.allow \
	&& sed -i "s/hosts:.*/hosts:          files mdns4 dns/g" /etc/nsswitch.conf \
	&& printf "[server]\nenable-dbus=no\n" >> /etc/avahi/avahi-daemon.conf \
	&& chmod 777 /etc/avahi/avahi-daemon.conf \
	&& mkdir -p /var/run/avahi-daemon \
	&& chown avahi:avahi /var/run/avahi-daemon \
	&& chmod 777 /var/run/avahi-daemon

RUN apt-get install -y wget \
                       libavahi-client3:armhf \
                       libavahi-common3:armhf \
                       apt-utils \
		       libvorbisidec1:armhf

RUN apt-get install -y squeezelite 

ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=armhf; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=armhf; else ARCHITECTURE=amd64; fi \
    && lastversion download badaix/snapcast --format assets --filter "^snapclient_(?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\-)?(?:(\d)(_$ARCHITECTURE\.deb))$" -o snapclient.deb

RUN apt-get install -fy ./snapclient.deb

COPY setup-files/ /app/
RUN chmod a+wrx /app/*

ENTRYPOINT ./entrypoint.sh

I added these three lines:

RUN pip install numpy
ENV CFLAGS="-I/usr/local/lib/python3.9/site-packages/numpy/core/include $CFLAGS"
RUN pip install aubio

@ShiromMakkad
Copy link
Owner

How'd you get that line for CFlags? I just checked and it's the aubio compilation that's failing. You shouldn't need to add the extra pip install for that or numpy because they should be dependencies. Honestly though, updating aubio separately so it makes a different layer in Docker may be worth it just because of how long it takes to compile.

@epiller
Copy link

epiller commented Mar 6, 2024

Would be really awesome if we got an update. I really love this image but I'm not skilled enough to figure it out myself. It's alright if you don't have the time though.

@ShiromMakkad
Copy link
Owner

Yea, I haven't had LEDs up for a while. Unfortunately, it's just low on my list right now. I do plan to put them up at some point and start developing on this repo, but for now I can't really respond to issues. There are a lot of really interesting issues with advice open that I do want to look at.

I would review a PR though. Updating LedFx should be a pretty gentle introduction to Docker. Most of the work was on the audio rather than building LedFx, but it takes an annoyingly long time to test because of the compilation times for ARM which I don't have right now.

@tc245
Copy link

tc245 commented Apr 5, 2024

Been fiddling around for a few weeks and managed to get it to build by changing the base image to a more recent version of python (python:3.10.14-bullseye), and installing cmake and numpy.

This dockerfile works for me...

FROM python:3.10.14-bullseye

WORKDIR /app

RUN pip install Cython
RUN dpkg --add-architecture armhf
RUN apt-get update
RUN apt-get install -y gcc \
                       git \
                       libatlas3-base \
		       libavformat58 \
		       portaudio19-dev \
		       avahi-daemon \
		       pulseaudio \
			   cmake
RUN pip install --upgrade pip wheel setuptools
RUN pip install lastversion
RUN pip install numpy
RUN pip install git+https://github.com/LedFx/LedFx

RUN apt-get install -y alsa-utils
RUN adduser root pulse-access

# https://gnanesh.me/avahi-docker-non-root.html
RUN apt-get install -y libnss-mdns
RUN echo '*' > /etc/mdns.allow \
	&& sed -i "s/hosts:.*/hosts:          files mdns4 dns/g" /etc/nsswitch.conf \
	&& printf "[server]\nenable-dbus=no\n" >> /etc/avahi/avahi-daemon.conf \
	&& chmod 777 /etc/avahi/avahi-daemon.conf \
	&& mkdir -p /var/run/avahi-daemon \
	&& chown avahi:avahi /var/run/avahi-daemon \
	&& chmod 777 /var/run/avahi-daemon

RUN apt-get install -y wget \
                       libavahi-client3:armhf \
                       libavahi-common3:armhf \
                       apt-utils \
		       libvorbisidec1:armhf

RUN apt-get install -y squeezelite 

ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=armhf; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=armhf; else ARCHITECTURE=amd64; fi \
    && lastversion download badaix/snapcast --format assets --filter "^snapclient_(?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\-)?(?:(\d)(_$ARCHITECTURE\.deb))$" -o snapclient.deb

RUN apt-get install -fy ./snapclient.deb

COPY setup-files/ /app/
RUN chmod a+wrx /app/*

ENTRYPOINT ./entrypoint.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants