fix: use amd64-base:latest with py3-numpy/py3-pillow from apk, no compiler needed
This commit is contained in:
@@ -1,28 +1,23 @@
|
|||||||
ARG BUILD_FROM
|
ARG BUILD_FROM
|
||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
# BlueZ for BLE/RFCOMM + build tools for packages without binary wheels
|
# Python 3, BlueZ and pre-compiled Alpine packages (no C compiler needed)
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
|
python3 \
|
||||||
|
py3-pip \
|
||||||
|
py3-numpy \
|
||||||
|
py3-pillow \
|
||||||
bluez \
|
bluez \
|
||||||
dbus \
|
dbus
|
||||||
gcc \
|
|
||||||
musl-dev \
|
|
||||||
libjpeg-turbo-dev \
|
|
||||||
zlib-dev
|
|
||||||
|
|
||||||
# Install Python runtime dependencies
|
# Pure-Python packages only (no compilation required)
|
||||||
RUN pip install --no-cache-dir \
|
RUN pip3 install --no-cache-dir --break-system-packages \
|
||||||
"bleak>=0.21" \
|
"bleak>=0.21" \
|
||||||
"numpy" \
|
|
||||||
"pillow" \
|
|
||||||
"fastapi>=0.111" \
|
"fastapi>=0.111" \
|
||||||
"uvicorn[standard]>=0.29" \
|
"uvicorn[standard]>=0.29" \
|
||||||
"python-multipart>=0.0.9"
|
"python-multipart>=0.0.9"
|
||||||
|
|
||||||
# Remove build-only packages to keep the image slim
|
|
||||||
RUN apk del gcc musl-dev
|
|
||||||
|
|
||||||
# Copy the fichero Python package into the container
|
# Copy the fichero Python package into the container
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY fichero/ /app/fichero/
|
COPY fichero/ /app/fichero/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
build_from:
|
build_from:
|
||||||
aarch64: "python:3.12-alpine3.21"
|
aarch64: "ghcr.io/home-assistant/aarch64-base:latest"
|
||||||
amd64: "python:3.12-alpine3.21"
|
amd64: "ghcr.io/home-assistant/amd64-base:latest"
|
||||||
armhf: "python:3.12-alpine3.21"
|
armhf: "ghcr.io/home-assistant/armhf-base:latest"
|
||||||
armv7: "python:3.12-alpine3.21"
|
armv7: "ghcr.io/home-assistant/armv7-base:latest"
|
||||||
i386: "python:3.12-alpine3.21"
|
i386: "ghcr.io/home-assistant/i386-base:latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user