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 \
|
2024-11-05 21:18:41 +00:00
|
|
|
UV_SYSTEM_PYTHON=true \
|
|
|
|
UV_NO_CACHE=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
|
2025-01-20 16:21:17 +00:00
|
|
|
RUN pip3 install uv==0.5.21
|
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-09-23 12:17:37 +00:00
|
|
|
&& uv pip install \
|
|
|
|
--no-build \
|
|
|
|
-r homeassistant/requirements_all.txt
|
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 /
|
|
|
|
|
2024-10-03 07:20:03 +00:00
|
|
|
# Needs to be redefined inside the FROM statement to be set for RUN commands
|
|
|
|
ARG BUILD_ARCH
|
|
|
|
# Get go2rtc binary
|
|
|
|
RUN \
|
|
|
|
case "${BUILD_ARCH}" in \
|
|
|
|
"aarch64") go2rtc_suffix='arm64' ;; \
|
|
|
|
"armhf") go2rtc_suffix='armv6' ;; \
|
|
|
|
"armv7") go2rtc_suffix='arm' ;; \
|
|
|
|
*) go2rtc_suffix=${BUILD_ARCH} ;; \
|
|
|
|
esac \
|
2025-01-13 16:02:23 +00:00
|
|
|
&& curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.8/go2rtc_linux_${go2rtc_suffix} --output /bin/go2rtc \
|
2024-10-03 07:20:03 +00:00
|
|
|
&& chmod +x /bin/go2rtc \
|
|
|
|
# Verify go2rtc can be executed
|
|
|
|
&& go2rtc --version
|
|
|
|
|
2020-03-22 23:39:37 +00:00
|
|
|
WORKDIR /config
|