11# # EMHASS-Add-On Docker
2-
32# build_version options are: addon (default), addon-git
43ARG build_version=addon
54# see build.yaml for all docker images according to host architecture
@@ -44,16 +43,15 @@ RUN apt-get update \
4443# specify hdf5
4544RUN ln -s /usr/include/hdf5/serial /usr/include/hdf5/include && export HDF5_DIR=/usr/include/hdf5
4645
47- # install packages from pip, use piwheels if arm
46+ # install packages from pip, use piwheels if arm 32bit
4847RUN [[ "${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
4948
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"
49+ # try, symlink apt cbc, to pulp cbc, in python directory (for 32bit)
50+ RUN [[ "${BUILD_ARCH}" == "armhf" || "${BUILD_ARCH}" == "armv7" ]] && 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"
5251
53- # if armv7 try install libatomic1 to fix scipy issue
52+ # if armv7, try install libatomic1 to fix scipy issue
5453RUN [[ "${BUILD_ARCH}" == "armv7" ]] && apt-get update && apt-get install libatomic1 || echo "libatomic1 cant be installed"
5554
56-
5755# remove build only packages
5856RUN apt-get purge -y --auto-remove \
5957 git \
@@ -74,7 +72,7 @@ RUN apt-get purge -y --auto-remove \
7472COPY config_emhass.yaml /app/
7573
7674# -------------------------
77- # EMHASS-ADDON Default (EMHASS from requirements)
75+ # EMHASS-Add-on Default
7876FROM base as addon
7977
8078LABEL \
@@ -87,7 +85,7 @@ LABEL \
8785ENTRYPOINT python3 -m emhass.web_server --addon True --url http://supervisor/core/api --key $SUPERVISOR_TOKEN
8886
8987# -----------
90- # EMHASS-ADD-ON testing with git
88+ # EMHASS-Add-on testing with git
9189FROM addon as addon-git
9290ARG build_repo=https://github.com/davidusb-geek/emhass.git
9391ARG build_branch=master
0 commit comments