diff --git a/Dockerfile b/Dockerfile index 43b21ab3ba8..da46f71ad22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,12 +28,19 @@ RUN \ && if ls homeassistant/home_assistant_intents*.whl 1> /dev/null 2>&1; then \ pip3 install homeassistant/home_assistant_intents-*.whl; \ fi \ - && \ + && if [ "${BUILD_ARCH}" = "i386" ]; then \ + LD_PRELOAD="/usr/local/lib/libjemalloc.so.2" \ + MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:20000,muzzy_decay_ms:20000" \ + linux32 pip3 install \ + --only-binary=:all: \ + -r homeassistant/requirements_all.txt; \ + else \ LD_PRELOAD="/usr/local/lib/libjemalloc.so.2" \ MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:20000,muzzy_decay_ms:20000" \ pip3 install \ --only-binary=:all: \ - -r homeassistant/requirements_all.txt + -r homeassistant/requirements_all.txt; \ + fi ## Setup Home Assistant Core COPY . homeassistant/ diff --git a/script/hassfest/docker.py b/script/hassfest/docker.py index c9d81424229..2856c1ee0ea 100644 --- a/script/hassfest/docker.py +++ b/script/hassfest/docker.py @@ -34,12 +34,19 @@ RUN \ && if ls homeassistant/home_assistant_intents*.whl 1> /dev/null 2>&1; then \ pip3 install homeassistant/home_assistant_intents-*.whl; \ fi \ - && \ + && if [ "${{BUILD_ARCH}}" = "i386" ]; then \ + LD_PRELOAD="/usr/local/lib/libjemalloc.so.2" \ + MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:20000,muzzy_decay_ms:20000" \ + linux32 pip3 install \ + --only-binary=:all: \ + -r homeassistant/requirements_all.txt; \ + else \ LD_PRELOAD="/usr/local/lib/libjemalloc.so.2" \ MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:20000,muzzy_decay_ms:20000" \ pip3 install \ --only-binary=:all: \ - -r homeassistant/requirements_all.txt + -r homeassistant/requirements_all.txt; \ + fi ## Setup Home Assistant Core COPY . homeassistant/