Compare commits

...

8 Commits

Author SHA1 Message Date
Pascal Vizeli
bd77b12d06
Merge 2470d16d85fe2643a050927aec2a125ad6e5ef50 into ad5827d33fcdb448b156edbd492c482df90c2930 2025-02-18 20:28:49 +01:00
Robert Resch
ad5827d33f
Bump uv to 0.6.1 (#5641)
* Bump uv to 0.6.0

* Bump uv to 0.6.1
2025-02-18 19:26:36 +01:00
Jan Čermák
249464e928
Generate Python bytecode for site-packages during build (#5640)
Since transition from pip to uv in #5152, Supervisor container doesn't
contain bytecode for site-packages anymore, and because our AppArmor
profile denies mkdir operations, the compiled *.pyc files are never
created. Enable uv --compile option to opt for the same behavior as pip
had, to fix of the AA errors and the potential penalty of compilation on
every import.
2025-02-18 18:44:37 +01:00
dependabot[bot]
3bc55c054a
Bump sentry-sdk from 2.21.0 to 2.22.0 (#5638)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.21.0...2.22.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-18 12:28:17 +01:00
Pascal Vizeli
2470d16d85 Cleanup 2022-08-09 14:36:56 +00:00
Pascal Vizeli
5c0172440a change name 2022-08-09 11:18:33 +00:00
Pascal Vizeli
006db94cc0 fix gateway 2022-08-09 08:32:16 +00:00
Pascal Vizeli
9f1ab99265 Support basic IPv6 2022-08-09 08:07:52 +00:00
4 changed files with 20 additions and 8 deletions

View File

@ -28,15 +28,15 @@ RUN \
\ \
&& curl -Lso /usr/bin/cosign "https://github.com/home-assistant/cosign/releases/download/${COSIGN_VERSION}/cosign_${BUILD_ARCH}" \ && curl -Lso /usr/bin/cosign "https://github.com/home-assistant/cosign/releases/download/${COSIGN_VERSION}/cosign_${BUILD_ARCH}" \
&& chmod a+x /usr/bin/cosign \ && chmod a+x /usr/bin/cosign \
&& pip3 install uv==0.2.21 && pip3 install uv==0.6.1
# Install requirements # Install requirements
COPY requirements.txt . COPY requirements.txt .
RUN \ RUN \
if [ "${BUILD_ARCH}" = "i386" ]; then \ if [ "${BUILD_ARCH}" = "i386" ]; then \
linux32 uv pip install --no-build -r requirements.txt; \ linux32 uv pip install --compile-bytecode --no-build -r requirements.txt; \
else \ else \
uv pip install --no-build -r requirements.txt; \ uv pip install --compile-bytecode --no-build -r requirements.txt; \
fi \ fi \
&& rm -f requirements.txt && rm -f requirements.txt

View File

@ -21,7 +21,7 @@ pyudev==0.24.3
PyYAML==6.0.2 PyYAML==6.0.2
requests==2.32.3 requests==2.32.3
securetar==2025.2.0 securetar==2025.2.0
sentry-sdk==2.21.0 sentry-sdk==2.22.0
setuptools==75.8.0 setuptools==75.8.0
voluptuous==0.15.2 voluptuous==0.15.2
dbus-fast==2.33.0 dbus-fast==2.33.0

View File

@ -43,6 +43,7 @@ SYSTEMD_JOURNAL_VOLATILE = Path("/run/log/journal")
DOCKER_NETWORK = "hassio" DOCKER_NETWORK = "hassio"
DOCKER_NETWORK_MASK = ip_network("172.30.32.0/23") DOCKER_NETWORK_MASK = ip_network("172.30.32.0/23")
DOCKER_NETWORK_RANGE = ip_network("172.30.33.0/24") DOCKER_NETWORK_RANGE = ip_network("172.30.33.0/24")
DOCKER_NETWORK_ULA = ip_network("fd00:172:30:32::/64")
# This needs to match the dockerd --cpu-rt-runtime= argument. # This needs to match the dockerd --cpu-rt-runtime= argument.
DOCKER_CPU_RUNTIME_TOTAL = 950_000 DOCKER_CPU_RUNTIME_TOTAL = 950_000

View File

@ -7,7 +7,12 @@ import logging
import docker import docker
import requests import requests
from ..const import DOCKER_NETWORK, DOCKER_NETWORK_MASK, DOCKER_NETWORK_RANGE from ..const import (
DOCKER_NETWORK,
DOCKER_NETWORK_MASK,
DOCKER_NETWORK_RANGE,
DOCKER_NETWORK_ULA,
)
from ..exceptions import DockerError from ..exceptions import DockerError
_LOGGER: logging.Logger = logging.getLogger(__name__) _LOGGER: logging.Logger = logging.getLogger(__name__)
@ -76,19 +81,25 @@ class DockerNetwork:
except docker.errors.NotFound: except docker.errors.NotFound:
_LOGGER.info("Can't find Supervisor network, creating a new network") _LOGGER.info("Can't find Supervisor network, creating a new network")
ipam_pool = docker.types.IPAMPool( # IP configuration
ipam_pool_v4 = docker.types.IPAMPool(
subnet=str(DOCKER_NETWORK_MASK), subnet=str(DOCKER_NETWORK_MASK),
gateway=str(self.gateway), gateway=str(self.gateway),
iprange=str(DOCKER_NETWORK_RANGE), iprange=str(DOCKER_NETWORK_RANGE),
) )
ipam_pool_v6 = docker.types.IPAMPool(
subnet=str(DOCKER_NETWORK_ULA),
gateway=str(DOCKER_NETWORK_ULA[1]),
)
ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool]) ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool_v4, ipam_pool_v6])
# Create Network
return self.docker.networks.create( return self.docker.networks.create(
DOCKER_NETWORK, DOCKER_NETWORK,
driver="bridge", driver="bridge",
ipam=ipam_config, ipam=ipam_config,
enable_ipv6=False, enable_ipv6=True,
options={"com.docker.network.bridge.name": DOCKER_NETWORK}, options={"com.docker.network.bridge.name": DOCKER_NETWORK},
) )