Giter VIP home page Giter VIP logo

addon-base-python's Introduction

Home Assistant Community Add-on: Log Viewer

GitHub Release Project Stage License

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture

Github Actions Project Maintenance GitHub Activity

Discord Community Forum

Buy me a coffee

Browser-based log utility for Home Assistant.

Log Viewer Screenshot

About

Easily monitor your Home Assistant logs in your web browser. Custom filtering is available to make it simple to differentiate different types of logs.

๐Ÿ“š Read the full add-on documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! ๐Ÿ˜

Authors & contributors

The original setup of this repository is by Dale Higgs.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant add-ons for you

Want some more functionality to your Home Assistant instance?

We have created multiple add-ons for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2018-2024 Dale Higgs <@dale3h>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon-base-python's People

Contributors

dependabot[bot] avatar felipecrs avatar frenck avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

addon-base-python's Issues

Compatibility with alpine py3-* packages

Problem/Motivation

apk install py3-* inside this container installs python modules for python 3.6, while python in this container is version 3.7, meaning the installed modules are unavailable.

Required packages can be installed through pip, but for some binary python packages (in my case numpy and scipy) this is very time consuming. Given that hassio recreates the container every restart, this is particularly problematic.

See hassio-addons/addon-appdaemon3#43

Expected behavior

apk install py3-numpy
python
>>> import numpy

Is successful

Actual behavior

import numpy results in a ModuleNotFoundError

Proposed changes

Given alpine edge repositories are already available in the container, using a fixed python 3.7 package from there instead of building locally may work. The edge package of python 3.7 requires a newer version of readline (8.x vs 7.x) than the alpine 3.9 version of bash, so either bash would need upgrading too, or apk would need to be coerced into installing both versions of readline.

Or something else :)

Missing `s6-applyuidgid`

$ docker run --rm -it --entrypoint= ghcr.io/hassio-addons/base/amd64:11.0.1 stat /bin/s6-applyuidgid
  File: /bin/s6-applyuidgid
  Size: 17320           Blocks: 40         IO Block: 4096   regular file
Device: 43h/67d Inode: 75235       Links: 1
Access: (0700/-rwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-01-22 13:36:36.000000000 +0000
Modify: 2021-01-22 13:36:36.000000000 +0000
Change: 2022-02-08 14:42:52.248227189 +0000

$ docker run --rm -it --entrypoint= ghcr.io/hassio-addons/base-python/amd64:8.0.1 stat /bin/s6-applyuidgid
stat: can't stat '/bin/s6-applyuidgid': No such file or directory

Refs TECH7Fox/asterisk-hass-addons#92 (comment)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
base/Dockerfile
  • ghcr.io/hassio-addons/base 15.0.7
github-actions
.github/workflows/ci.yaml
.github/workflows/deploy.yaml
.github/workflows/labels.yaml
.github/workflows/lock.yaml
.github/workflows/pr-labels.yaml
.github/workflows/release-drafter.yaml
.github/workflows/stale.yaml
regex
base/Dockerfile
  • ghcr.io/hassio-addons/base 15.0.7
base/build.yaml
  • ghcr.io/hassio-addons/base 15.0.7
  • ghcr.io/hassio-addons/base 15.0.7
  • ghcr.io/hassio-addons/base 15.0.7
  • ghcr.io/hassio-addons/base 15.0.7
  • ghcr.io/hassio-addons/base 15.0.7
base/Dockerfile
  • alpine_3_19/bzip2-dev 1.0.8-r6
  • alpine_3_19/dpkg-dev 1.22.1-r0
  • alpine_3_19/dpkg 1.22.1-r0
  • alpine_3_19/expat-dev 2.6.0-r0
  • alpine_3_19/findutils 4.9.0-r5
  • alpine_3_19/gcc 13.2.1_git20231014-r0
  • alpine_3_19/gdbm-dev 1.23-r1
  • alpine_3_19/gnupg 2.4.4-r0
  • alpine_3_19/libc-dev 0.7.2-r5
  • alpine_3_19/libffi-dev 3.4.4-r3
  • alpine_3_19/libnsl-dev 2.0.1-r0
  • alpine_3_19/libtirpc-dev 1.3.4-r0
  • alpine_3_19/linux-headers 6.5-r0
  • alpine_3_19/make 4.4.1-r2
  • alpine_3_19/ncurses-dev 6.4_p20231125-r0
  • alpine_3_19/openssl-dev 3.1.4-r5
  • alpine_3_19/pax-utils 1.3.7-r2
  • alpine_3_19/readline-dev 8.2.1-r2
  • alpine_3_19/sqlite-dev 3.44.2-r0
  • alpine_3_19/tar 1.35-r2
  • alpine_3_19/tcl-dev 8.6.13-r1
  • alpine_3_19/tk-dev 8.6.13-r2
  • alpine_3_19/tk 8.6.13-r2
  • alpine_3_19/util-linux-dev 2.39.3-r0
  • alpine_3_19/xz-dev 5.4.5-r0
  • alpine_3_19/xz 5.4.5-r0
  • alpine_3_19/zlib-dev 1.3.1-r0
base/Dockerfile
  • python/cpython v3.12.2
base/Dockerfile
  • setuptools 69.2.0
base/Dockerfile
  • pip 24.0

  • Check this box to trigger a request for Renovate to run again on this repository

Get an error when > docker run -it hassioaddons/base-python bash

Problem/Motivation

Try to run this base image on my armbian linux. But get an error.

Please help.

I am not sure if it's the docker image problem or my environment problem.

Network should be fine and I am using latest hassio 0.94.4.

Expected behavior

be able to run

Actual behavior

get this error

[cont-init.d] 00-banner.sh: executing...
curl: (6) Could not resolve host: hassio
[00:56:44] ERROR: Something went wrong contacting the API

Steps to reproduce

root@aml:~# uname -a
Linux aml 5.1.0-aml-s905 #5.88 SMP PREEMPT Thu May 30 16:10:10 MSK 2019 aarch64 aarch64 aarch64 GNU/Linux

root@aml:~# docker images
REPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE
hassioaddons/base-python                  latest              75dd1964a8e6        6 hours ago         117MB
.........

root@aml:~# docker run -it hassioaddons/base-python bash
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
curl: (6) Could not resolve host: hassio
[00:56:44] ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
/var/run/s6/etc/cont-init.d/01-log-level.sh: line 41: log_level: unbound variable
[cont-init.d] 01-log-level.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.

 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@aml:~# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:6dff:fe38:9f11  prefixlen 64  scopeid 0x20<link>
        ether 02:42:6d:38:9f:11  txqueuelen 0  (Ethernet)
        RX packets 1748  bytes 150190 (150.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 29287  bytes 4635379 (4.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether fc:7c:02:8d:f9:de  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20

hassio: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.30.32.1  netmask 255.255.254.0  broadcast 172.30.33.255
        inet6 fe80::42:26ff:fe6c:3358  prefixlen 64  scopeid 0x20<link>
        ether 02:42:26:6c:33:58  txqueuelen 0  (Ethernet)
        RX packets 1242  bytes 365229 (365.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 28778  bytes 4040185 (4.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 26754  bytes 3369470 (3.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26754  bytes 3369470 (3.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth8647156: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::48b6:6ff:fed4:cb44  prefixlen 64  scopeid 0x20<link>
        ether 4a:b6:06:d4:cb:44  txqueuelen 0  (Ethernet)
        RX packets 1707  bytes 170016 (170.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 29381  bytes 4644277 (4.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth2714dfe: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f09d:57ff:febb:a95f  prefixlen 64  scopeid 0x20<link>
        ether f2:9d:57:bb:a9:5f  txqueuelen 0  (Ethernet)
        RX packets 1242  bytes 382617 (382.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 28869  bytes 4047509 (4.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.115  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::bc7c:3584:2728:b015  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:74:f2:6c  txqueuelen 1000  (Ethernet)
        RX packets 661682  bytes 421212702 (421.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 100394  bytes 15707618 (15.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Error 31 at install on Raspberry Pi4

Problem/Motivation

Error 31 at install
I get error31 when I install this addon.
This mean: 31 = Too many links

Expected behavior

A normal install and no error

Actual behavior

I get the following error message:

The command '/bin/bash -o pipefail -c apk add --no-cache --virtual .build-dependencies bzip2-dev=1.0.8-r1 dpkg-dev=1.20.9-r0 dpkg=1.20.9-r0 expat-dev=2.4.7-r0 findutils=4.8.0-r1 gcc=10.3.1_git20211027-r0 gdbm-dev=1.22-r0 gnupg=2.2.31-r1 libc-dev=0.7.2-r3 libffi-dev=3.4.2-r1 libnsl-dev=1.3.0-r0 libtirpc-dev=1.3.2-r0 linux-headers=5.10.41-r0 make=4.3-r0 ncurses-dev=6.3_p20211120-r0 openssl-dev=1.1.1n-r0 pax-utils=1.3.3-r0 readline-dev=8.1.1-r0 sqlite-dev=3.36.0-r0 tar=1.34-r0 tcl-dev=8.6.11-r0 tk-dev=8.6.11-r0 tk=8.6.11-r0 util-linux-dev=2.37.4-r0 xz-dev=5.2.5-r0 xz=5.2.5-r0 zlib-dev=1.2.11-r3 && curl -J -L -o /tmp/python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" && curl -J -L -o /tmp/python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" && export GNUPGHOME="$(mktemp -d)" && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" && gpg --batch --verify /tmp/python.tar.xz.asc /tmp/python.tar.xz && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } && mkdir -p /usr/src/python && tar -xJC /usr/src/python --strip-components=1 -f /tmp/python.tar.xz && cd /usr/src/python && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared --with-system-expat --with-system-ffi --without-ensurepip && make -j "$(nproc)" EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" && make install && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | xargs -rt apk add --no-cache --virtual .python-rundeps && find /usr/local -depth \( \( -type d -a \( -name test -o -name tests \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \) -exec rm -rf '{}' + && cd /usr/local/bin && ln -s idle3 idle && ln -s pydoc3 pydoc && ln -s python3 python && ln -s python3-config python-config && curl -J -L -o /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' && python /tmp/get-pip.py --disable-pip-version-check --no-cache-dir "pip==$PYTHON_PIP_VERSION" && apk del --no-cache --purge .build-dependencies && rm -f -r /usr/src "$GNUPGHOME" /tmp/* && python3 --version && pip3 --version && find /usr/local -depth \( \( -type d -a \( -name test -o -name tests \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \) -exec rm -rf '{}' +' returned a non-zero code: 31

Steps to reproduce

On a Home Assistant installation on a Raspberry Pi4

Home Assistant OS 8.0
supervisor-2022.05.2
Docker versie  20.10.14
Totale schijfruimte : 457.7 GB
Gebruikte schijfruimte : 13.4 GB
Gezond : true```
Copy the files from this addon (Dockerfile, build.yaml, config,yaml) to a directory named "day_ahead"
Install from "local addons"

## Proposed changes
Perhaps the long command can be cut in two or three pieces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.