1
+ # Automatically generated by hassfest.
2
+ #
3
+ # To update, run python3 -m script.hassfest -p docker
4
+ ARG BUILD_FROM
5
+ FROM ${BUILD_FROM}
6
+
7
+ # Synchronize with homeassistant/core.py:async_stop
8
+ ENV \
9
+ S6_SERVICES_GRACETIME=240000 \
10
+ UV_SYSTEM_PYTHON=true \
11
+ UV_NO_CACHE=true
12
+
13
+ ARG QEMU_CPU
14
+
15
+ # Home Assistant S6-Overlay
16
+ COPY rootfs /
17
+
18
+ # Needs to be redefined inside the FROM statement to be set for RUN commands
19
+ ARG BUILD_ARCH
20
+ # Get go2rtc binary
21
+ RUN \
22
+ case "${BUILD_ARCH}" in \
23
+ "aarch64" ) go2rtc_suffix='arm64' ;; \
24
+ "armhf" ) go2rtc_suffix='armv6' ;; \
25
+ "armv7" ) go2rtc_suffix='arm' ;; \
26
+ *) go2rtc_suffix=${BUILD_ARCH} ;; \
27
+ esac \
28
+ && curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.9/go2rtc_linux_${go2rtc_suffix} --output /bin/go2rtc \
29
+ && chmod +x /bin/go2rtc \
30
+ # Verify go2rtc can be executed
31
+ && go2rtc --version
32
+
33
+ # Install uv
34
+ RUN pip3 install uv==0.7.1
35
+
36
+ WORKDIR /usr/src
37
+
38
+ # # Setup Home Assistant Core dependencies
39
+ COPY requirements.txt homeassistant/
40
+ COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
41
+ RUN \
42
+ uv pip install \
43
+ --no-build \
44
+ -r homeassistant/requirements.txt
45
+
46
+ COPY requirements_all.txt home_assistant_frontend-* home_assistant_intents-* homeassistant/
47
+ RUN \
48
+ if ls homeassistant/home_assistant_*.whl 1> /dev/null 2>&1; then \
49
+ uv pip install homeassistant/home_assistant_*.whl; \
50
+ fi \
51
+ && uv pip install \
52
+ --no-build \
53
+ -r homeassistant/requirements_all.txt
54
+
55
+ # # Setup Home Assistant Core
56
+ COPY . homeassistant/
57
+ RUN \
58
+ uv pip install \
59
+ -e ./homeassistant \
60
+ && python3 -m compileall \
61
+ homeassistant/homeassistant
62
+
63
+ WORKDIR /config
0 commit comments