Files
second-screen/Dockerfile
T

24 lines
626 B
Docker

FROM python:3.12-slim
# Pinned commit of the Turing Smart Screen library (we only need library/).
ARG LCD_COMMIT=2b33ab4f00a096916dd6a1174441a53a7ec33b03
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
ADD https://github.com/mathoudebine/turing-smart-screen-python/archive/${LCD_COMMIT}.tar.gz /tmp/lcd.tar.gz
RUN mkdir -p /opt/lcd \
&& tar -xzf /tmp/lcd.tar.gz -C /opt/lcd --strip-components=1 --wildcards '*/library' \
&& rm /tmp/lcd.tar.gz
ENV LCD_LIB_PATH=/opt/lcd \
PYTHONUNBUFFERED=1 \
TZ=Europe/Prague
COPY assets ./assets
COPY *.py ./
CMD ["python", "main.py"]