[ALL][RPI4] More work on pre-shipping containers

This commit is contained in:
j1nx 2023-12-02 14:22:47 +00:00
parent 9da8f7a580
commit b3584319c5
21 changed files with 40 additions and 18 deletions

View File

@ -59,7 +59,7 @@ done
# Prepare home data
rm -f ${BINARIES_DIR}/homefs.ext4
truncate --size="5G" ${BINARIES_DIR}/homefs.ext4
truncate --size="6G" ${BINARIES_DIR}/homefs.ext4
mkfs.ext4 -L "homefs" -E lazy_itable_init=0,lazy_journal_init=0 ${BINARIES_DIR}/homefs.ext4
# Mount home image

View File

@ -1,4 +1,4 @@
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

View File

@ -22,10 +22,11 @@ UserNS=keep-id:uid=%U,gid=%G
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=%t/bus:/run/user/1000/bus:ro
Volume=ovos_tts_cache:/home/ovos/.cache/mycroft
Volume=ovos_venv_audio:/home/ovos/.venv
[Service]
TimeoutStartSec=900

View File

@ -14,7 +14,7 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=/var/log/ovos:/var/log/mycroft
[Service]

View File

@ -23,9 +23,10 @@ EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
AddDevice=/dev/gpiomem
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_nltk:/home/ovos/nltk_data
Volume=ovos_venv_core:/home/ovos/.venv
Volume=%h/ovos/share:/home/ovos/.local/share/mycroft
[Service]

View File

@ -10,7 +10,7 @@ After=ovos_messagebus.service
Wants=ovos_phal.service
After=ovos_phal.service
Wants=ovos_gui_websocket.service
After=ovos_gui_websocker.service
After=ovos_gui_websocket.service
[Container]
ContainerName=ovos_gui
@ -27,7 +27,7 @@ AddDevice=/dev/dri
AddDevice=/dev/vchiq
AddDevice=/dev/input
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=%t/bus:/run/user/1000/bus:ro
Volume=%h/ovos/share:/home/ovos/.local/share/mycroft

View File

@ -16,7 +16,7 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=ovos_gui_files:/home/ovos/.cache/ovos_gui_file_server
[Service]

View File

@ -22,11 +22,12 @@ UserNS=keep-id:uid=%U,gid=%G
EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_listener_records:/home/ovos/.local/share/mycroft/listener
Volume=ovos_models:/home/ovos/.local/share/precise-lite
Volume=ovos_vosk:/home/ovos/.local/share/vosk
Volume=ovos_venv_listener:/home/ovos/.venv
[Service]
TimeoutStartSec=900

View File

@ -14,7 +14,7 @@ Network=host
Timezone=local
UserNS=keep-id:uid=%U,gid=%G
Volume=%h/ovos/config:/home/ovos/.config/mycroft:ro
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
[Service]
TimeoutStartSec=900

View File

@ -21,8 +21,9 @@ EnvironmentFile=%h/.config/containers/env
AddDevice=/dev/snd
AddDevice=/dev/gpiomem
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=%t/pipewire-0:/run/user/1000/pipewire-0:ro
Volume=ovos_venv_phal:/home/ovos/.venv
[Service]
TimeoutStartSec=900

View File

@ -17,7 +17,7 @@ Timezone=local
UserNS=keep-id:uid=%U,gid=%G
AddDevice=/dev/gpiomem
Volume=%h/ovos/config:/home/ovos/.config/mycroft
Volume=/dev/shm:/tmp
Volume=%h/ovos/tmp:/tmp
Volume=/sys:/sys:ro
Volume=/dev:/dev:ro

View File

@ -305,7 +305,7 @@ BR2_PACKAGE_HOST_PKGCONF=y
BR2_PACKAGE_HOSTNAME_SERVICE=y
BR2_PACKAGE_NCPAMIXER=y
BR2_PACKAGE_OVOS_CONTAINERS=y
BR2_PACKAGE_OVOS_CONTAINERS_ARCH="aarch64"
BR2_PACKAGE_OVOS_CONTAINERS_ARCH="arm64"
BR2_PACKAGE_OVOS_CONTAINERS_IMAGES="ovos-messagebus"
BR2_PACKAGE_OVOS_SPLASH=y
BR2_PACKAGE_RESPEAKER=y

View File

@ -12,7 +12,7 @@ dst_dir=$4
image_name="docker.io/smartgic/${image}"
full_image_name="${image_name}:alpha"
image_digest=$(skopeo inspect --retry-times=5 "docker://${full_image_name}" | jq -r '.Digest')
image_digest=$(skopeo --override-arch "${arch}" inspect --retry-times=5 "docker://${full_image_name}" | jq -r '.Digest')
image_file_name="${full_image_name//[:\/]/_}@${image_digest//[:\/]/_}"
image_file_path="${dl_dir}/${image_file_name}.tar"
@ -24,7 +24,7 @@ dst_image_file_path="${dst_dir}/${image_file_name}.tar"
if [ ! -f "${image_file_path}" ]
then
echo "Fetching image: ${full_image_name} (digest ${image_digest})"
skopeo copy "docker://${image_name}@${image_digest}" "docker-archive:${image_file_path}:${full_image_name}"
skopeo --override-arch "${arch}" copy "docker://${image_name}@${image_digest}" "docker-archive:${image_file_path}:${full_image_name}"
else
echo "Skipping download of existing image: ${full_image_name} (digest ${image_digest})"
fi

View File

@ -0,0 +1,5 @@
[Volume]
User=ovos
Group=ovos
Copy=true
Label=name=ovos_venv_audio

View File

@ -0,0 +1,5 @@
[Volume]
User=ovos
Group=ovos
Copy=true
Label=name=ovos_venv_core

View File

@ -0,0 +1,5 @@
[Volume]
User=ovos
Group=ovos
Copy=true
Label=name=ovos_venv_listener

View File

@ -0,0 +1,5 @@
[Volume]
User=ovos
Group=ovos
Copy=true
Label=name=ovos_venv_phal

View File

@ -1,12 +1,10 @@
git+https://github.com/OpenVoiceOS/skill-ovos-homescreen.git
git+https://github.com/openVoiceOS/skill-ovos-date-time.git
git+https://github.com/openVoiceOS/skill-ovos-naptime.git
git+https://github.com/openVoiceOS/skill-ovos-news.git
git+https://github.com/OpenVoiceOS/skill-ovos-personal.git
git+https://github.com/OpenVoiceOS/skill-ovos-stop.git
git+https://github.com/OpenVoiceOS/skill-ovos-volume.git
git+https://github.com/OpenVoiceOS/skill-ovos-weather.git
git+https://github.com/OpenVoiceOS/skill-ovos-youtube-music.git
git+https://github.com/OpenVoiceOS/skill-ovos-fallback-unknown.git
git+https://github.com/OpenVoiceOS/skill-ovos-wikipedia.git
git+https://github.com/OpenVoiceOS/skill-ovos-wolfie.git

View File

@ -30,7 +30,7 @@ KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0
SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
SUBSYSTEM=="input", GROUP="input"
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664"
SUBSYSTEM=="video4linux", GROUP="video"