homeassistant-docker-venv icon indicating copy to clipboard operation
homeassistant-docker-venv copied to clipboard

Matplotlib created a temporary config/cache directory

Open vrabac opened this issue 4 years ago • 1 comments

I needed to setup home-assistant from scratch, but seems with the latest home-assistant release this docker venv does not work correctly or at least there is weird message in docker logs. Even there is such kind of message below, the configuration is written correctly to the file system. Can this message about matplotlib be ignored?

What I did:

cd $HOME/.docker/home-assistant/docker/
git pull
git log

docker pull homeassistant/raspberrypi3-64-homeassistant:2021.2.1
docker run -d \
  --name=home-assistant --net=host --restart=always \
  -e "TZ=Europe/Vienna" \
  -e "PUID=$(id -u)" \
  -e "PGID=$(id -g)" \
  -e "PACKAGES=iputils" \
  -v $HOME/.docker/home-assistant:/config \
  -v "$HOME/.docker/home-assistant/docker/run:/etc/services.d/home-assistant/run" \
  -v /etc/localtime:/etc/localtime:ro \
  homeassistant/raspberrypi3-64-homeassistant:2021.2.1

The docker log:

$ docker logs -f home-assistant
[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] udev.sh: executing...
[09:10:37] INFO: Setup udev backend inside container
starting version 3.2.9
[09:10:37] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[09:10:38] INFO: Creating user homeassistant with 1001:985
[09:10:38] INFO: Installing extra packages: iputils
[09:10:40] INFO: Initializing venv in /var/tmp/homeassistant-venv
[09:11:00] INFO: Activating venv
[09:11:00] INFO: Starting homeassistant
2021-02-09 09:11:24 WARNING (MainThread) [matplotlib] Matplotlib created a temporary config/cache directory at /tmp/matplotlib-kkbs7hgw because the default path (/root/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
Unable to find configuration. Creating default one in /config
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
$

the files and directory on filesystem are owned by same PUID and PGID and are actually created by home-assistant itself (from scratch).

$ ls -n
drwxr-xr-x 8 1001  985 4096 Feb  9 14:46 home-assistant
drwxr-xr-x 5 1883 1883 4096 Jan  8 11:26 mosquitto
drwxr-xr-x 3 1001  985 4096 Feb  9 14:39 zigbee2mqtt
$

vrabac avatar Feb 09 '21 14:02 vrabac

Hey @vrabac, thank you for reporting this bug and sorry for not getting back to your earlier. I just merged a commit which adds a proper home directory for the homeassistant user, which – I hope – solves your problem. Could you try with the version from master and report back? Thanks!

tribut avatar Apr 10 '21 10:04 tribut