File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 22
33# build_version options are: addon (default), addon-git
44ARG build_version=addon
5- # BUILD_ARCH, HA equivalent to TARGETARCH
6- ARG BUILD_ARCH
7- # BUILD_FROM, os_version equivalent
5+ # see build.yaml for all docker images according to host architecture
86ARG BUILD_FROM
97
10-
11- FROM ghcr.io/home-assistant/$BUILD_ARCH-base-$BUILD_FROM:bookworm AS base
12-
8+ FROM ${BUILD_FROM} AS base
139
1410# check if BUILD_ARCH passed by build-arg
1511ARG BUILD_ARCH
@@ -44,15 +40,20 @@ RUN apt-get update \
4440 libglpk-dev \
4541 glpk-utils \
4642 libatlas-base-dev \
47- libopenblas-dev
43+ libopenblas-dev
4844# specify hdf5
4945RUN ln -s /usr/include/hdf5/serial /usr/include/hdf5/include && export HDF5_DIR=/usr/include/hdf5
50- # try symlink apt cbc to pulp python directory
51- RUN ln -sf /usr/bin/cbc /usr/local/lib/python3.11/dist-packages/pulp/solverdir/cbc/linux/32/cbc || echo "cbc link didnt work"
5246
5347# install packages from pip, use piwheels if arm
5448RUN [[ "${BUILD_ARCH}" == "armhf" || "${BUILD_ARCH}" == "armv7" ]] && pip3 install --index-url=https://www.piwheels.org/simple --no-cache-dir --break-system-packages -r requirements.txt || pip3 install --no-cache-dir --break-system-packages -r requirements.txt
5549
50+ # try symlink apt cbc to pulp cbc in python directory (for 32bit)
51+ RUN [[ "${BUILD_ARCH}" == "armhf" ]] && ln -sf /usr/bin/cbc /usr/local/lib/python3.11/dist-packages/pulp/solverdir/cbc/linux/32/cbc || echo "cbc symlink didnt work/not required"
52+
53+ # if armv7 try install libatomic1 to fix scipy issue
54+ RUN [[ "${BUILD_ARCH}" == "armv7" ]] && apt-get update && apt-get install libatomic1 || echo "libatomic1 cant be installed"
55+
56+
5657# remove build only packages
5758RUN apt-get purge -y --auto-remove \
5859 git \
Original file line number Diff line number Diff line change 11build_from : # choose between debian or raspbian images
2- armhf : raspbian
3- aarch64 : debian
4- amd64 : debian
5- armv7 : debian
2+ amd64 : ghcr.io/home-assistant/amd64-base-debian:bookworm
3+ armhf : ghcr.io/home-assistant/armhf-base-raspbian:bookworm
4+ armv7 : ghcr.io/home-assistant/armv7-base- debian:bookworm
5+ aarch64 : ghcr.io/home-assistant/aarch64-base- debian:bookworm
66args :
77 build_version : addon
88 build_repo : https://github.com/davidusb-geek/emhass.git # addon-git mode
You can’t perform that action at this time.
0 commit comments