2023-11-29 10:26:50 +00:00
|
|
|
# Automatically generated by hassfest.
|
|
|
|
#
|
|
|
|
# To update, run python3 -m script.hassfest -p docker
|
2020-03-22 23:39:37 +00:00
|
|
|
ARG BUILD_FROM
|
2020-03-23 00:00:00 +00:00
|
|
|
FROM ${BUILD_FROM}
|
2020-03-22 23:39:37 +00:00
|
|
|
|
2021-01-11 10:24:02 +00:00
|
|
|
# Synchronize with homeassistant/core.py:async_stop
|
2020-04-10 20:04:50 +00:00
|
|
|
ENV \
|
2024-03-22 15:50:07 +00:00
|
|
|
S6_SERVICES_GRACETIME=240000 \
|
|
|
|
UV_SYSTEM_PYTHON=true
|
2020-04-10 20:04:50 +00:00
|
|
|
|
2023-01-19 09:22:23 +00:00
|
|
|
ARG QEMU_CPU
|
|
|
|
|
2024-03-22 15:50:07 +00:00
|
|
|
# Install uv
|
2024-07-20 11:24:21 +00:00
|
|
|
RUN pip3 install uv==0.2.27
|
2024-03-22 15:50:07 +00:00
|
|
|
|
2020-03-22 23:39:37 +00:00
|
|
|
WORKDIR /usr/src
|
|
|
|
|
2021-12-01 12:20:00 +00:00
|
|
|
## Setup Home Assistant Core dependencies
|
|
|
|
COPY requirements.txt homeassistant/
|
|
|
|
COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
|
|
|
|
RUN \
|
2024-03-22 15:50:07 +00:00
|
|
|
uv pip install \
|
|
|
|
--no-build \
|
2023-01-12 10:59:44 +00:00
|
|
|
-r homeassistant/requirements.txt
|
|
|
|
|
2023-01-13 11:14:25 +00:00
|
|
|
COPY requirements_all.txt home_assistant_frontend-* home_assistant_intents-* homeassistant/
|
2021-12-01 12:20:00 +00:00
|
|
|
RUN \
|
2024-03-23 10:22:38 +00:00
|
|
|
if ls homeassistant/home_assistant_*.whl 1> /dev/null 2>&1; then \
|
|
|
|
uv pip install homeassistant/home_assistant_*.whl; \
|
2023-01-13 08:56:29 +00:00
|
|
|
fi \
|
2024-01-05 07:23:04 +00:00
|
|
|
&& if [ "${BUILD_ARCH}" = "i386" ]; then \
|
2024-03-22 15:50:07 +00:00
|
|
|
linux32 uv pip install \
|
|
|
|
--no-build \
|
2024-01-05 07:23:04 +00:00
|
|
|
-r homeassistant/requirements_all.txt; \
|
|
|
|
else \
|
2024-03-22 15:50:07 +00:00
|
|
|
uv pip install \
|
|
|
|
--no-build \
|
2024-01-05 07:23:04 +00:00
|
|
|
-r homeassistant/requirements_all.txt; \
|
|
|
|
fi
|
2021-12-01 12:20:00 +00:00
|
|
|
|
|
|
|
## Setup Home Assistant Core
|
2020-03-22 23:39:37 +00:00
|
|
|
COPY . homeassistant/
|
2020-04-10 20:04:50 +00:00
|
|
|
RUN \
|
2024-03-22 15:50:07 +00:00
|
|
|
uv pip install \
|
2023-01-12 10:59:44 +00:00
|
|
|
-e ./homeassistant \
|
|
|
|
&& python3 -m compileall \
|
|
|
|
homeassistant/homeassistant
|
2020-03-22 23:39:37 +00:00
|
|
|
|
|
|
|
# Home Assistant S6-Overlay
|
|
|
|
COPY rootfs /
|
|
|
|
|
|
|
|
WORKDIR /config
|