Files
linux-voice-assistant/examples/ReSpeaker 4mic HAT/Dockerfile
Omar Amin 2d460b6728 Leds and buttons events (#266)
Use events and commands to control custom onboard leds and buttons. Can be used to communicate with an external Python script via a WebSocket API running in a container alongside LVA.
2026-07-03 19:58:45 +03:00

45 lines
1.6 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM python:3.13-slim-bookworm
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
LABEL \
org.opencontainers.image.title="ReSpeaker 4-Mic Array Peripheral Controller" \
org.opencontainers.image.description="LED ring and button controller for ReSpeaker 4-Mic Array HAT, communicating with Linux Voice Assistant" \
org.opencontainers.image.source="https://github.com/OHF-Voice/linux-voice-assistant"
# ----------------------------------------------------------------------------
# System packages
#
# build-essential – compiles spidev / apa102-pi C extensions
# python3-dev – Python C headers
# git – some pip packages pull from git during install
# ----------------------------------------------------------------------------
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
build-essential \
python3-dev \
git \
ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# ----------------------------------------------------------------------------
# Python dependencies
#
# websockets – WebSocket client for LVA peripheral API
# apa102-pi – APA102 LED ring driver (SPI)
# spidev – low-level SPI access (used by apa102-pi)
# gpiozero – GPIO button input (Pi 3/4/5 compatible)
# lgpio – gpiozero backend; works on Pi 3/4/5 including Pi 5
# ----------------------------------------------------------------------------
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY respeaker_4mic_hat.py ./
ENTRYPOINT ["python3", "respeaker_4mic_hat.py"]
CMD []