OpenVoiceOS / ovos-docker

Open Voice OS container images and docker-compose.yml files for x86_64 and aarch64 CPU architectures.
https://openvoiceos.github.io/ovos-docker/
Apache License 2.0
41 stars 13 forks source link

Request: Place *.state files in ~/.local/state/mycroft #59

Open j1nx opened 2 months ago

j1nx commented 2 months ago

Add the moment the *.state files are being saved to /tmp and /tmp is mounted to ~/ovos/tmp however I would like to mount /tmp to a tmpfs such that all the different .lock and other tmp files are automatically deleted at a reboot.

I do not want to loose .state files across reboots though, otherwise it will always install the pip packages listed within .list files at every boot.

j1nx commented 2 months ago

I noticed this is taken care of within the Alpine PR however would like to extend the request with;

can we please implement this mechanism to all container images except the ovos-gui-shell?

Even if we do not really mention it within the docs.

i am running all containers under Podman with quadlets utilizing systemd. This so there is no overhead of a container daemon.

Within that method, containers are started with the --rm and --replace flags. Keep any installed Python packages and to make sure they get re-used when the images are updated, i bind mount a volume over the user's .venv folder within the container which copies over the content from the image if the volume does not exist.

That way it also allows for an easy rest method by just "podman volune rm " and remove the state file if needed.

Your .list / .state mechanism is perfect however can easily be also used to install any pip installable python package. The above will then also take care of keeping anything customly installed on top op the image.

(It will not influence any users that do not use it)

goldyfruit commented 1 month ago

https://github.com/OpenVoiceOS/ovos-docker/pull/61