mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use jemalloc in Docker builds (#85738)
This commit is contained in:
parent
45a41421b6
commit
e18a6e376c
39
Dockerfile
39
Dockerfile
@ -11,22 +11,45 @@ WORKDIR /usr/src
|
|||||||
COPY requirements.txt homeassistant/
|
COPY requirements.txt homeassistant/
|
||||||
COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
|
COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
pip3 install \
|
||||||
-r homeassistant/requirements.txt --use-deprecated=legacy-resolver
|
--no-cache-dir \
|
||||||
|
--no-index \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--find-links "${WHEELS_LINKS}" \
|
||||||
|
--use-deprecated=legacy-resolver \
|
||||||
|
-r homeassistant/requirements.txt
|
||||||
|
|
||||||
COPY requirements_all.txt home_assistant_frontend-* homeassistant/
|
COPY requirements_all.txt home_assistant_frontend-* homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
if ls homeassistant/home_assistant_frontend*.whl 1> /dev/null 2>&1; then \
|
if ls homeassistant/home_assistant_frontend*.whl 1> /dev/null 2>&1; then \
|
||||||
pip3 install --no-cache-dir --no-index homeassistant/home_assistant_frontend-*.whl; \
|
pip3 install \
|
||||||
|
--no-cache-dir \
|
||||||
|
--no-index \
|
||||||
|
homeassistant/home_assistant_frontend-*.whl; \
|
||||||
fi \
|
fi \
|
||||||
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
&& \
|
||||||
-r homeassistant/requirements_all.txt --use-deprecated=legacy-resolver
|
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 \
|
||||||
|
--no-cache-dir \
|
||||||
|
--no-index \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--find-links "${WHEELS_LINKS}" \
|
||||||
|
--use-deprecated=legacy-resolver \
|
||||||
|
-r homeassistant/requirements_all.txt
|
||||||
|
|
||||||
## Setup Home Assistant Core
|
## Setup Home Assistant Core
|
||||||
COPY . homeassistant/
|
COPY . homeassistant/
|
||||||
RUN \
|
RUN \
|
||||||
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
pip3 install \
|
||||||
-e ./homeassistant --use-deprecated=legacy-resolver \
|
--no-cache-dir \
|
||||||
&& python3 -m compileall homeassistant/homeassistant
|
--no-index \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--find-links "${WHEELS_LINKS}" \
|
||||||
|
--use-deprecated=legacy-resolver \
|
||||||
|
-e ./homeassistant \
|
||||||
|
&& python3 -m compileall \
|
||||||
|
homeassistant/homeassistant
|
||||||
|
|
||||||
# Home Assistant S6-Overlay
|
# Home Assistant S6-Overlay
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user